SharePoint Online: "Anyone with the link" is Greyed Out

Problem: "Anyone with the link" is disabled in SharePoint Online Share window is greyed out!
sharepoint online anyone with the link 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 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"
    enable external sharing with anonymous access links in sharepoint online
  • 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 

2 comments:

  1. Sites are being created with Sharing set to "Don't allow sharing outside your organization" but the global setting is to Allow Anonymous sharing. I need to go into the Admin center and reset the value every time a new site is created. Any idea what is causing this and how I can change it?

    The sites are being created through Power Automate REST API calls, using the Modern Team Site without Group template (STS#3)

    ReplyDelete
    Replies
    1. hallo eric, were you able to fix this? we have a similar issue.

      Delete

Please Login and comment to get your questions answered!

Powered by Blogger.