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
Connect-PnPOnline https://contoso-admin.sharepoint.com

# Enable external sharing. Possible values are:
# ExistingExternalUserSharingOnly
# ExternalUserAndGuestSharing
# ExternalUserSharingOnly
Set-PnPTenantSite -Url https://contoso.sharepoint.com/teams/Communication201 -Sharing ExternalUserSharingOnly

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.

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).

image

The Share button is disabled for external users.

image

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.

image

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.

image

Happy sharing!

5 comments:

  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!

    ReplyDelete
    Replies
    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.

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

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

      Delete