Turn external sharing on or off for a site
You must be a global or SharePoint admin in Microsoft 365 to change the external sharing setting for a site (previously called a "site collection"). Site owners are not allowed to change this setting.
Note that this procedure applies to classic sites, communication sites, and new team sites. To learn how to change the external sharing setting for a user's OneDrive, see Change the external sharing setting for a user's OneDrive. For info about changing your organization-level settings, see Turn external sharing on or off for SharePoint.
For detailed information about how to set up guest access for a site, see Collaborate with guests in a site.
To configure external sharing for a site
Go to the Active sites page of the new SharePoint admin center, and sign in with an account that has admin permissions for your organization.
If you have Office 365 Germany, sign in to the Microsoft 365 admin center, then browse to the SharePoint admin center and open the Active sites page.
If you have Office 365 operated by 21Vianet (China), sign in to the Microsoft 365 admin center, then browse to the SharePoint admin center and open the Active sites page.
In the left column, select a site.
Select an external sharing option (see the following table).
If you want to limit the sharing of this site by domain, select the Limit sharing by domain check box, and add the domains that you want to allow or block.
If you want to change the default sharing link type, permissions, or expiration setting for this site, clear the Same as organization-level setting check box and set the value that you want to use for this site. For more info, see Change the default sharing link for a site.
Which option to select...
|Select this option:||If you want to:|
||Allow site owners and others with full control permission to share the site with people who authenticate. Allow site users to decide when sharing files and folders to require authentication or allow unauthenticated people to access the item. Anyone links to files and folders can be freely forwarded.
|New and existing guests
||Allow site owners and others with full control permission to share the site with people outside the organization. These people will need to sign in and will be added to the directory. Allow site users to share files and folders with people who aren't in the organization's directory.
||Allow sharing with only people already in your directory. These users may exist in your directory because they previously accepted sharing invitations or because they were manually added. (You can tell an external user because they have #EXT# in their user name.)
|Only people in your organization
||Prevent all site users from sharing any site content externally. (This is the default setting for new classic sites.)
The settings available are dependent on your organization-level setting. If you enable external sharing for a site and it is later turned off for your organization, external sharing will become unavailable at the site level and any shared links will stop working. If it is turned back on for the organization, the site sharing setting will return to what it was before and the shared links will resume working.
You might have site content shared with a Microsoft 365 group that has guest members, and the group settings prevent guest members from accessing group resources. In this case, even if you turn on external sharing for the site, guests of the group may not be able to access site content. To enable or disable Microsoft 365 Group guest member access, see Manage guest access in Microsoft 365 Groups.