Anonymous guest sharing in Teams

To kick-start this blog I would like to show you how to share folders or documents, like the weekly schedule, homework etc., with anonymous guests like parents.

For the sake of clarity, these are not guests invited to the actual team, but rather anyone receiving or accessing the link, by email, a text message or from a webpage.

Unfortunately for our use case, when a team is created, the underlying SharePoint site has a default SharingCapability of ExternalUserSharingOnly. We can find the SharingCapability by logging onto Sharepoint Online with PowerShell, as an admin user with the appropriate permissions:

Connect-SPOService
Get-SPOSite -Identity siteurl | select SharingCapability

SharingCapability : ExternalUserSharingOnly

We can see in the docs that ExternalUserSharingOnly allows external user sharing (share by email), but not guest link sharing.

SharingAnyoneDisabled

What we need is ExternalUserAndGuestSharing, where both external user sharing, and guest link sharing are enabled; Let’s see how we can acomplish that using powershell.

First, we need to establish the site url. There are several ways to get the URL, but as an end user we can find it by navigating to the team’s general channel and the files tab, then choose open in SharePoint. A browser window will open with a long URL, where you will need to extract everything including what comes immediately after /sites/. The rest of the URL can safely be ignored.

The URL should look like this: https://tenantname.sharepoint.com/sites/teamname
(teamname at the end of the URL is not the displayname, but what is called mailnickname in Azure AD)

Let’s store the URL in a variable for later use:

$siteurl = https://tenantname.sharepoint.com/sites/teamname

The same information is accessible with Exchange Online powershell, you can easily while logged on get a list of Groups and their SharePointSiteUrl with the following command:

Get-UnifiedGroup | select DisplayName, Alias, SharePointSiteURL

Then all we need to do is change the SharingCapability property:

Set-SPOSite -Identity $siteurl -SharingCapability ExternalUserAndGuestSharing

To be sure let’s check the SharingCapability one last time:

Get-SPOSite -identity $siteurl | select SharingCapability

SharingCapability : ExternalUserAndGuestSharing

Now you can choose a folder or document whithin the team’s SharePoint site and share with Anyone. In this setting you would most likely also want to disallow editing. Once you hit Apply you can copy the link and distribute it as you choose. Happy sharing!

SharingAnyoneEnabled

Stay tuned for more on this, in a later article I will show you how to do this in bulk for teams generated by School Data Sync, and maybe all SharePoint sites belonging to Class, PLC or Staff teams.

One thought on “Anonymous guest sharing in Teams

  1. Pingback: Anonymous guest sharing in Teams part two. | Teams.rocks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s