Friday, December 1, 2017

Teams sharing files with external non-teams members

Sharing files with external guest is a native SharePoint feature.

Teams relays on Office 365 Groups. Any O365 Group can be used and is required for activating a MS Teams.

Therefore the basic settings once a Teams was created, which automatically creates an Office 365 has external non-teams-guest sharing disabled by default.

The structure for external file sharing is:

1. Organizational Setting (Tenant Level)
Admin centers > SharePoint/sharing

2. SharePoint Site Collection
Admin centers > SharePoint/site collections/sharing


3. Office 365 Groups setting

We need now managing external sharing for Office 365 Group site collections.


We can share files from within Teams either as Teams link or native SharePoint link.
As per default setting, the Teams Groups 365 Group site collection will NOT allow sharing with external, non-member guest users.


This you will see even if the global tenant level has activated the external access to file and the global SharePoint settings allow those sharing.

Next we need activating it explicitly on the Office 365 SP Site Collection.




If you update only a dedicated Office 365 Site Collection:


Set-SPOSite -Identity https://tenant.sharepoint.com/sites/site1 -SharingCapability SharingOption
Updating the sharing setting for all sites in a tenant   You can use the following script to update the sharing setting for all of your sites:



$userCredential = Get-Credential

Connect-SPOService -Url https://TenantName-admin.sharepoint.com -Credential $userCredential

$sites = Get-sposite -template GROUP#0 -includepersonalsite:$false

Foreach($site in $sites)
{
Set-SPOSite -Identity $site.Url -SharingCapability SharingOption
}
Write-Host("External Sharing Capability updated for all sites.")
Variables:
  • TenantName - The name of your Office 365 tenant.
  • SharingOption - The sharing option that you want to use, from the table above.

For SharingOption, use one of the following parameters:
ParameterDescription
DisabledExternal user sharing (share by email) and guest link sharing are both disabled.
ExternalUserSharingOnlyExternal user sharing (share by email) is enabled, but guest link sharing is disabled.
ExternalUserAndGuestSharingExternal user sharing (share by email) and guest link sharing are both enabled. This is the default setting.
ExistingExternalUserSharingOnlyExternal user sharing (share by email) is available only for external users that are already in the directory.

Verifying your Sharing Options:

(Get-SPOSite -Identity https://tenant.sharepoint.com/sites/site1).SharingCapability

Happy trying...!

Further References:

No comments:

Post a Comment