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 SharePoint Online tenant.
- Login to Office 365 Admin Center >> SharePoint admin center
- Click on “Sharing” from left navigation >> Set “Sharing outside your organization“
to “Allow sharing to authenticated external users and using
anonymous access links”
- Click “OK” to save your changes.
PnP PowerShell to Enable Guest Sharing for a Site Collection
Once the external sharing with anonymous access is enabled at the tenant level, we have to make sure its enabled at site collection level also.
#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