Forum Discussion
David Shvartsman
Feb 20, 2018Copper Contributor
Unable to modify SharingCapability property for SPO Site using Set-SPOSite
We are trying to configure SPO Sites for sharing with external users using PowerShell by executing the following command:
Set-SPOSite -Identity "https://{tenant}.sharepoint.com/sites/{sitename}" -S...
- DeletedFeb 20, 2018Have you tried setting the -SharingCapability setting first by itself then adding the others? I use that flag all the time and it works. What error are your receiving? It's possible that you must have the Sharing setting on the tenant level to a level that falls under the setting you are setting for that site. So the tenant level setting probably needs to allow external sharing before you can set it at the site level. Just a thought, but try solo, and maybe even set it to a lesser setting and see if it takes, if it does and it's not letting you set to external users it might be that tenant setting slider that needs increased to allow it on a site.
David Shvartsman
Feb 20, 2018Copper Contributor
Thank you Christopher Webb for the advise. I have to set the properties
one by one like this: You will need to do multiple commands: $url =
https://{tenant}.sharepoint.com/sites/{site name} Set-SPOSite -Identity
$url -SharingCapability ExternalUserSharingOnly Set-SPOSite -Identity
$url -SharingDomainRestrictionMode AllowList -SharingAllowedDomainList
"{domains}" get-SPOSite -Identity $url | fL URL, Template,
Owner,SharingCapability, SharingAllowedDomainList,
ConditionalAccessPolicy, SharingDomainRestrictionMode,
SharingBlockedDomainList