SharePoint online: Share your excel report to anonymous users

Sometime, you have an excel report located in your SharePoint Online, and you want to share it to anonymous user (not require to login), how can you do that?

First, you need to turn on “Allow sharing to authenticated external user and using anonymous access link”


Then, select the site collections that you want to share to anonymous, turn on this “Allow shareing with all external users, and by using anonymous access links”


Now, we go to the excel report that you want to share to external user and click share.


Then copy the link in the dialog.

So, the link should be similar this:–iVrpej5m2b–sGmQA?e=7r7fRe

But wait, you don’t want to share the whole file, you just want to share the report in the file. Humm, let’s get the report link first:

In your excel online file, click to File -> Share -> Embed


Select the report area in the embed dialog, then you will have a script similar this:

< iframe width=”1024″ height=”1024″ frameborder=”0″ scrolling=”no” src=”{3b87e537-8c58-4267-9638-e57fed27b7c9}&action=embedview&ActiveCell=’OverviewTable’!B4&Item=TableOverview&wdHideGridlines=True&wdInConfigurator=True“></ iframe>

Now, you can combine 2 links above to have a final link for your report. The final link should be like this:–iVrpej5m2b–sGmQA?e=7r7fRe&sourcedoc={3b87e537-8c58-4267-9638-e57fed27b7c9}&action=embedview&ActiveCell=’OverviewTable’!B4&Item=TableOverview&wdHideGridlines=True&wdInConfigurator=True

Use the tool online to make that url shorter, then from now on, you can send that link to anonymous user to see your report.

Good luck!

PnP Tools for SharePoint Modernization scanner + GetWebLoginClientContext


$authenticationManagerSiteScope = New-Object -TypeName OfficeDevPnP.Core.AuthenticationManager




Get SharePoint site/subsites template using javascript

var siteCollections = [;

siteCollections.forEach(function (site) {
var webCollection = null;
function getWebTemplate() {
var context = new SP.ClientContext(site);
//var context = SP.ClientContext.get_current();
var web = context.get_web();
function () {
var webTemplate = web.get_webTemplate();
var configuration = web.get_configuration();

var templateName = webTemplate + “#” + configuration;
var isTeamSite = templateName === “STS#0”;

console.log(site + “,” + templateName + “,,” + (isTeamSite? “Classic Team Site”: “”));

url: site + “/_api/web/webs/?$select=title,ServerRelativeUrl,Created,webTemplate,configuration”,
method: “GET”,
headers: {
“Accept”: “application/json; odata=verbose”
success: function (data) {
$.each(data.d.results, function (index, item) {
templateName = item.WebTemplate + “#” + (item.Configuration + 1);
isTeamSite = templateName === “STS#0”;

console.log(site + item.ServerRelativeUrl + “,” + templateName + “,,” + (isTeamSite ? “Classic Team Site” : “”));
error: function (data) {
//console.log(site + “,,Unable to get sub sites”);

function (sender, args) {
//console.log(site + “,,Unable to check the site template”);