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

Currently (July 2017) 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 -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

3 thoughts on “SharePoint Online Set a site collection as Read Only

  1. Try:
    set-SPSite – Identity “url_to_site” -LockState “ReadOnly”


    Sets the lock state of this site collection. The valid lock states are

    Unlock Unlocks the site collection and makes it available to users

    NoAdditions Prevents users from adding new content to the site collection. Updates and deletions are still allowed

    ReadOnly Prevents users from adding, updating, or deleting content.

    NoAccess Prevents access to content completely. Users who attempt to access the site receive an access-denied message.

  2. I like the helpful info you provide for your articles. I will bookmark your blog
    and test once more here regularly. I’m rather certain I’ll learn a lot of new stuff right here!

    Good luck for the following!

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s