Office365 · sharepoint 2013 · SharePoint 2016 · sharepoint online

SharePoint Online Set a site collection as Read Only

Screen Shot 2017-07-16 at 23.11.36

There are many different business scenarios when we want to set a SharePoint site collection as read-only mode (as shown in above screenshot) to prevent any further addition/modification of content but simultaneously to make the existing content available to the users. In SharePoint on-premise, this was primarily done via central administration or using powershell. But these tehniques do not apply to SharePoint Online.

Is there a way to make the site read-only via powershell?

Answer: NO

Currenty in SharePoint Online USING POWERSHELL THERE IS NO WAY TO SET THE SITE AS READ ONLY. Powershell only gives us below options where you can set a site to NO ACCESS. But this will make the whole site in accessible.

Set-SPOSite https://%5Btenant%5D.sharepoint.com/sites/targetsite -LockState NoAccess

The only two available options for LockState are NoAccess or Unlock, and there is NO READ ONLY options. See more about Set-SPOSite command here.

What is the easy technique which works?

You can use SharePoint OOTB site policies to set a site collection as read-only mode. When a site collection is closed using Site policy, there is an option to set it to read-only mode and the users will receive notification about the closure. Let’s see how to do it. You need to be an administrator to perform the below steps:

  1. Go to the Site collection and navigate to Site Settings page.
  2. Under Site Collection Administration, you can see “Site Policies“.Click on it and create a new policy with below settings.Screen Shot 2017-07-16 at 23.00.48.png

Here we are defining a site policy which will not close the site or delete the site automatically but will set the site to read-only when it is closed by some other action.

3.  Now let’s go back to Site Settings and under Site Administration, click on Site Closure & Deletion. Now select Site Policy as the one which we created in the above step  and click on Close this site now.

Screen Shot 2017-07-16 at 23.10.46

(Sometimes you might see Close this site now is disabled even after selection of site policy. In those case select the policy, click OK and come back to page again).

Voila now you can see that the site is set to read ony and you can see the info bar on the top saying the site is now read only.

Screen Shot 2017-07-16 at 23.11.36.png

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s