I am creating a document management system on O365 SharePoint Online. I have added several columns of data for each pdf which is uploaded to a folder.

I would like to temporarily "lock" a certain file in order to prevent changes to any of the columns. However, I and anyone with editing access needs to be able to "unlock" it as well to allow for changes.

Basically, I am trying to add a level of protection to the documents and make sure that the person changing the columns is meaning to do so. I know about the check in/out system, but I want anyone to be able to lock and unlock any document at any time.

Is this possible?

1 Answer 1


According to my research, the Check Out function means that the document is locked by xxx. Only xxx Check In(unlock) the document, other users can edit the document.

enter image description here

enter image description here

enter image description here

In my opinion, the Check Out/Check In can well support your needs. You can also Check Out (lock) document through powershell command. It's worth noting that this command can only be run as a site administrator.

$SiteURL = "https://tenant.sharepoint.com/sites/sitename/"
$FileRelativeURL ="/sites/sitename/libraryname/Test.docx"
#Connect to PNP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)
#Checkout the File
Set-PnPFileCheckedOut -Url $FileRelativeURL

#Checkin the File
#Set-PnPFileCheckedIn -Url $FileRelativeURL
  • Thanks @EchoDu_MSFT. The only problem with locking a document is that I need another member of my team to be able to unlock that same document to edit the properties if needed (and not wait until I unlock it). It is my understanding that this isn't possible.
    – Rachel
    Commented Aug 9, 2021 at 20:50
  • Yes, Rachel. According to my research, only the corresponding user can check in the document that was checked out. Commented Aug 26, 2021 at 9:54

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.