Friday, August 11, 2017

Enable external sharing on Communication sites

By default when you create a Communication site, external sharing has been disabled. As Communication sites are not listed in the site collection admin UI you need to turn to code or PowerShell to fix this.

I’m using PnP PowerShell where you enable external sharing using the following code:

# Connect to admin site

# Enable external sharing. Possible values are:
# ExistingExternalUserSharingOnly
# ExternalUserAndGuestSharing
# ExternalUserSharingOnly
# Disabled

Set-PnPTenantSite -Url -Sharing ExternalUserSharingOnly

Similar code for SPO commandlets would be, where we also allow anonymous sharing of documents:
# Connect to admin site
Connect-SPOService -Url

Set-SPOSite -Identity -SharingCapability ExternalUserAndGuestSharing

I chose to use ExternalUserSharingOnly as you cannot share the full site anonymously, only documents, and sharing documents anonymously from a Communication site might not be the most obvious scenario.

Note: You have to ensure that the sharing settings on your tenant allows the sharing capability you are setting for the site.

The next step is to invite your external users. If you try to share using the Share site button in the UI, this won’t allow adding an external user (per writing this post).

The Share button is disabled for external users.

Instead navigate to Site permissions and hit the advanced permissions settings link. Or tack /_layouts/15/user.aspx at the end of the URL of your site. This is the old SharePoint permission page where you can hit the Grant Permissions button, and fill in your external user. Be sure to check off the email invitation and pick which access level the user should have. I’m adding my external user as a visitor in this example.


When clicking the site link in the invitation e-mail my external user is now added to the site and can browse around. Notice that as an external user you get blue/black suite bar, as the tenant theme won’t show for external users.


Happy sharing!


  1. Thanks for this. But the navigation is missing when logged in as external user. Any idea what causes this and how to fix this? Thanks in advance!

    1. Not sure, but I suspect it's hidden due to avoid navigation outside of the site. You could use SPFx extensions when in GA to add your own navigation - but that requires development.

  2. The 'highlighted content' web part is also not working for external users :(

    1. Interesting.. error, or no content? And could be a security trimming issue of sorts.

  3. I followed the steps above and am getting the following errors. PowerShell Novice, be gentle :)

    PS C:\WINDOWS\system32> Set-PnPTenantSite -Url -Sharing ExternalUserSharingOnly
    At line:1 char:24
    + Set-PnPTenantSite -Url <a href=" ...
    + ~
    The '<' operator is reserved for future use.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RedirectionNotSupported

    PS C:\WINDOWS\system32> Set-PnPTenantSite -Url -Sharing ExternalUserSharingOnly
    Set-PnPTenantSite : The site is not properly formed.
    At line:1 char:1
    + Set-PnPTenantSite -Url ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : WriteError: (:) [Set-PnPTenantSite], ServerException
    + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.SetTenantSite

    1. ->

      The site url, not a page url :)

  4. MS has fixed the problem on "Share Site", now we can use "Share Site" with external users.