If you are staring at the screen what would have gone wrong with anonymous external sharing option which stays grayed out even after enabling the functionality from the Admin center, you are not alone as it seems to be a well-known issue. You can keep trying the Admin portal interface but this post is for those who didn’t got it sorted.
The usual place to look at when you need to enable this option in SharePoint online is the Admin Centers —> SharePoint —> Sharing —> Sharing outside your organization
If the following options are enabled, you should be able to see the Anonymous option in the sharing prompt.
If you still do not see the option, you can go ahead and try this PowerShell code to enable this manually. This will immediately enable the functionality in your tenant.
- Firstly, download and install SharePoint online management shell from here
Then find it from the start menu and run it with elevated permissions (Run as Administrator)
Run the following lines one by one (Customize the advised values to match your organization and URLs)
$adminUPN=”Admin Email address” (user the admin account you use to login to your office 365 Admin portal)
$userCredential = Get-Credential -UserName $adminUPN -Message “Type the password.” (Don’t change anything here, the “type the password” is for the prompt textbox only)
You will be prompted for credentials verification. Provide the username/password and hit ok.
Connect-SPOService -Url https://$orgname-admin.company.com -Credential $userCredential (no change here either)
And here’s the final step. Do not run this for all site collections. Find out which are the ones requires external sharing and run it for those sites only.
Set-SPOSite -Identity https://myorg.sharepoint.com/sites/ExternalSiteName -SharingCapability ExternalUserAndGuestSharing
Change the link above with the site you want to enable the external sharing with.
Once PowerShell command returns the success, refresh the browser and you will see the feature enabled.