SharePoint Online: Change a Site from Private to Public (or Vice versa)

Requirement: Change a private site to a 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 and private by default. It is possible to change the privacy settings of a site from private to public or vice versa while creating sites from the admin center. This post will outline the steps for changing a SharePoint Online site from private to public, including the options available for controlling access and the considerations to keep in mind when making this change.

Let’s see the difference between private and public sites:

  • 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.

$SiteURL = ""

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 (it 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.

It’s worth noting that after changing a SharePoint Online site from private to public, the site will be accessible to anyone with the link, and the site will show up in search results. Additionally, you should make sure that the site doesn’t contain any sensitive or confidential information before making it public.

In summary, changing a SharePoint Online site from private to public is a simple process that can be accomplished using the SharePoint Online Management Shell or PowerShell. By following the steps outlined in this article, you should be able to change a SharePoint Online site from private to public easily and make it accessible to everyone in the organization.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

10 thoughts on “SharePoint Online: Change a Site from Private to Public (or Vice versa)

  • Is there a way to write this script to automate changing multiple hundreds of sites from public to private?

  • So… when you are using the word “public” you are referring to ANYONE, in the world that can sign into Sharepoint Online?
    Or does it mean someone in the organization that can sign into your Sharepoint Online?
    And private would mean only specific people can sign in.
    Public doesn’t really mean “public”, it means everyone who has access in your organization…. right?

  • How would you monitor for changes like this? Or apply policy to prevent it?

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

    • Use this script:

      Get-PnPMicrosoft365Group -IncludeSiteUrl | Select DisplayName, Mail, SiteURL, Visibility
      • Hi

        Need powershell command to get first 200 public sites. Thanks

        • Use this script:

          $TenantSiteURL = ""
          #Connect to PnP Online
          Connect-PnPOnline -Url $TenantSiteURL -Interactive
          #Get first 200 Sites
          Get-PnPMicrosoft365Group -IncludeSiteUrl | Where {$_.Visibility -eq "Public"} | Select DisplayName, Mail, SiteURL, Visibility -First 200
          • Thanks!! How to include the siteowners?

          • How to include the site owners from the above script? thanks


Leave a Reply

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