1

I am building some logic programmatically. The target is to archive a site collection. I need to remove all the permissions and give everybody read permissions. In SharePoint 2013 on prem it was possible with the lockstate.

I read this article and I see you can use the lockstate also for O365, but it has only the possiblity to do NoAccess or Unlock. There is no read only like in on prem.

What is the best practice to set a site collection on read only?

1 Answer 1

0

You can create a site policy to set it to read only when it is closed: enter image description here

When you close the site from Site Administration (Site Closure and Deletion) select your policy and the site will be set to read only. You can optionally set deletion policies too. Also note you need the Site policy feature enabled for this to work: enter image description here

I have no idea whether this is exposed via the API or not as I have not looked...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.