Manage External Sharing Domains for SharePoint Online Team Sites
Question details
Configure allowed or blocked external sharing domains for a modern SharePoint Online team site.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- An administrator wants to manage external sharing restrictions for a modern team or collaboration site.
- Observed behavior
- The available domain restriction controls may be limited in the SharePoint admin center, and modern sites may not appear in the classic administration experience.
Obtain the team site's full URL and your SharePoint admin center URL, such as https://contoso-admin.sharepoint.com. Sign in with an account that has the required SharePoint administrative permissions and check your organization's existing external sharing policies.
Set site-level domain restrictions with SharePoint Online PowerShell
Use Set-SPOSite when you need to configure an allowlist or blocklist for a modern SharePoint site.
Site-level restrictions work within the limits of your organization's sharing settings; they cannot make sharing more permissive than the tenant policy. Domain restrictions on a SharePoint site do not replace policies governing Microsoft 365 group membership or other services.
Open PowerShell and, if the SharePoint Online Management Shell is not installed, run: Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser
Run Connect-SPOService -Url https://contoso-admin.sharepoint.com, replacing the URL with your SharePoint admin center URL, and sign in when prompted.
For an allowlist, run Set-SPOSite -Identity https://contoso.sharepoint.com/sites/project -SharingDomainRestrictionMode AllowList -SharingAllowedDomainList "partner.com example.com". Replace the site URL and domains with your own. To use a blocklist instead, run Set-SPOSite -Identity https://contoso.sharepoint.com/sites/project -SharingDomainRestrictionMode BlockList -SharingBlockedDomainList "blocked.com example.com".
Run Get-SPOSite -Identity https://contoso.sharepoint.com/sites/project | Select-Object SharingCapability, SharingDomainRestrictionMode, SharingAllowedDomainList, SharingBlockedDomainList and check the returned values.
Work with shared Office documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents. Its format compatibility helps you move existing files between office suites, but it does not change SharePoint sharing policies.

Frequently Asked Questions
How do I allow sharing with specific external domains?
Connect with Connect-SPOService, then use Set-SPOSite with -SharingDomainRestrictionMode AllowList and -SharingAllowedDomainList followed by the space-separated domains.
Can I use both an allowlist and a blocklist on the same site?
The site's SharingDomainRestrictionMode selects the active restriction mode. Use either AllowList or BlockList for the intended policy, then check the mode with Get-SPOSite.
Why can't a site share with a domain on its allowlist?
Check the organization's external sharing settings in the SharePoint admin center under Policies > Sharing. A site-level setting cannot override a more restrictive organization-wide policy.
Where can I find a modern team site if it is missing from the classic admin experience?
In the modern SharePoint admin center, open Sites > Active sites and search for the site. You can also use its full URL with Get-SPOSite in the SharePoint Online Management Shell.
Will blocking a domain remove existing guest access?
Do not assume that changing the domain list removes existing access. Review the site's permissions and guest access separately after applying the restriction.




