When provisioning with SharePoint sites the External sharing option can be configured.
If the External Sharing is not enabled any Sites will have the organisation level settings applied. this can be checked in SharePoint Admin Centre > Policies > Sharing
The Site level settings can be set during the provisioning process through the app in each Service Definition created. The Site Level permission cannot be more permissive than the organisation level.
If Existing guests has been set (see the image above.) The maximum permission option at the Site level is Existing guests.
Set the Site Level External Sharing options
- Go to Admin > Service Definitions > Security
- Set Enable External sharing Yes
NOTE if this is not enabled the organisation level default will be used
- Set the default option that will be displayed on the request form
- Choose whether to 'Allow requestor to choose External sharing option'
- If set to No, the default setting will always be applied
- If set to Yes, the override value type must be set to 'Options list' and the available options enabled. Whichever have Yes will be visible on the request form.
- Save the Service Definition
To restrict External Sharing, Enable External sharing must be Yes and the Default set to Only people in your organisation. Allow requestor to choose is No
Once a new request is processed and created the settings chosen on the request form will be applied to the SharePoint site:
Troubleshooting
If the Site level selected is more permissive than the organisation level the following error will be displayed in the Job queue:
Info -> Guest Access -> Setting guest access to Enabled.
Info -> Guest Access -> Set guest access to Enabled.
Info -> ChangeExternalSharing -> Getting current external sharing value
Info -> ChangeExternalSharing -> Current external sharing value is 'Only people in your organization - No external sharing allowed'
Exception (failure) -> ChangeExternalSharing -> Error setting external sharing. You can’t set the sharing capability to the level you specified, because it is a less restrictive setting than either its parent site collection or your organization.
Exception (failure) -> Error running process. You can’t set the sharing capability to the level you specified, because it is a less restrictive setting than either its parent site collection or your organization.