SharePoint Online: Change Site from Private to Public

Requirement: Change a private site to public in SharePoint Online.

Switch between Private and Public Sites in SharePoint Online

In SharePoint Online, modern team sites are created with an Office 365 Group associated by default. You can set the site privacy to public or private while creating sites from the admin center.

  • In “Private” SharePoint sites, The Owners of the Office 365 group get added as “Site Collection Administrators” and the members of the Office 365 Group get added to the default Members group of the SharePoint site – anyone else can’t access the SharePoint site.
  • In “Public” sites, the Owners of the Office 365 group get under “Site Collection Administrators” and Members of the Office 365 group get added to the default members group of the site (Similar to “Private”). In addition, the “Everyone except external users” group is added under the members group of the site.
    sharepoint online change site from public to private

SharePoint Online: How to Change a Site from Private to Public?

How do I make a SharePoint site public to everyone? To change an Office 365 group enabled site from private to public (or to change a Public SharePoint Online site to private), follow these steps:

  1. Navigate to your SharePoint Online site >> Click on Settings gear >> Click on the “Site Information” link.
  2. On the Site Information page, under “Privacy Setting”, you can set the site privacy to either private or public based on your requirements.
    sharepoint online change from private to public
  3. Hit the “Save” button at the bottom of the page to commit your changes.

This sets the privacy of the associated Office 365 group (it takes a while, though!). To change Office 365 group privacy from private to public or vice-versa, use: How to Change Office 365 Group Privacy from Private to Public using PowerShell?

How to make SharePoint Online site public?
Is it possible to create a public-facing website using SharePoint Online? No! Unfortunately, we can’t. All users accessing a SharePoint Online site must be authenticated with a Microsoft account. However, You can share a File or Folder with anyone without authentication using the “Share” feature (Provided “Anyone” sharing policy is enabled both at the Tenant and site levels).

PnP PowerShell to Switch the SharePoint Online Site from Private to Public (and Vice-versa)

Here is how to switch the associated Microsoft 365 Group of the SharePoint Online site from private to public.

#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/sales"

Try {
    #Connect to PnP Online
    Connect-PnPOnline -Url $SiteURL -Interactive
    
    #Get the SharePoint Online Site and its associated Microsoft 365 Group
    $Site = Get-PnPSite -Includes GroupId
     
    #Change the Group from Private to Public
    Set-PnPMicrosoft365Group -Identity $Site.GroupID -IsPrivate:$False
    Write-host "Updated the Site's Privacy!" -f Green    
}
Catch {
    write-host -f Red "`tError:" $_.Exception.Message
}

Set the “IsPrivate” switch to “$True” to change the site from Public to Private. Please note, it takes a while (took 15 min for me!) for the changes to take effect on the SharePoint Online side, although the Group’s privacy settings are updated immediately.

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

2 thoughts on “SharePoint Online: Change Site from Private to Public

  • need a script to list out private and public sites in tenant.

    Reply
    • Use:
      Get-PnPMicrosoft365Group -IncludeSiteUrl | Select DisplayName, Mail, SiteURL, Visibility

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *