Problem: “Anyone with the link” is disabled in SharePoint Online Share window is greyed out!
How to Enable Anyone with the link option in SharePoint Online?
As a first step, we need to enable sharing with anonymous users at the tenant level. Here is how to enable external users with anonymous links in the SharePoint Online tenant.
- Login to Office 365 Admin Center >> SharePoint admin center (https://YOUR-TENANT-admin.sharepoint.com)
- Click on “Sharing” from the left navigation >> Move the slider to top and set “Most permissive – Anyone – Users can share files and folders using links that don’t require sign-in.”
- Click “OK” to save your changes.
Enable Sharing Settings to “Anyone” for the Site Collection
Once the external sharing with anonymous access is enabled at the tenant level, we have to make sure it’s enabled at the site collection level also.
- In the SharePoint admin center, click on “Sites” >> “Active sites” from the left navigation.
- Search and select the site that you want to set sharing policy.
- Click on the site name, and click on the “Policies” tab in the property pane, Click on “Edit” under “External Sharing”
- In the External sharing options, choose “Anyone” and click Save.
PnP PowerShell to Enable Guest Sharing for a Site Collection
You can use the below PowerShell script to enable external sharing to “Anyone”.
#Parameter $SiteURL= "https://crescent.sharepoint.com/sites/marketing" #Connect to PnP Online Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential) #Set Sharing Settings to Enable Anonymous sharing Set-PnPTenantSite -Url $SiteURL -Sharing ExternalUserAndGuestSharing
Make sure “Limited-access user permission lockdown mode” Feature is disabled!
Once you enabled the Sharing settings to “Anyone” both at the tenant and at the site collection level, the next thing to look at is: Disable “Limited-access user permission lockdown mode”
- Go to Your site collection >> Click on Settings Gear >> Click on “Site Information” >> Click on “View All Site Information” link.
- Under the site settings page, Click on “Site Collection Features”
- Click on “Deactivate” button next to “Limited-access user permission lockdown mode” feature and confirm the prompt on the next page.
This fix is applicable for OneDrive for business as well.