Forum Discussion
Cannot Release Lock on SharePoint Online File
- Jul 17, 2018
Locks is a complex topic and technically a client or network issue. SharePoint supports co-authoring locks unless you have Check In/Out enabled on the library. Client side locks will occur if Office cannot negotiate a co-author lock falling back to an exclusive lock. As others have pointed out, the upload center can contribute to locking and is one of the first things you should check. You can trace the calls via Fiddler on the client.
This is the technical explanation from PSS:
When a user attempts to open an Office file hosted on SharePoint in the Office client, there is an expected set of network calls we should be seeing unless there is a problem. Once a user clicks that Office file to open in client, code on the SharePoint page and (if using Internet Explorer) the Office 365 browser addon sends a command to initialize the client application (Word, Excel, PowerPoint). Once the Office client application starts launching, Office will start a HTTP conversation with SharePoint. If the Office call is already authenticated, the Office will be returned the file content. However, if not already authenticated, which is usually expected to be the case, Office will negotiate for Authentication with SharePoint. This process happens through two networking calls called OPTIONS calls. The first OPTIONS call is anonymous and expected to be rejected by SharePoint as to establish what types of authentication SharePoint will accept. The second options call will include the requested authentication information to SharePoint. If SharePoint accepts the second options, call, it will return a METHOD call, identifying what network verbs can be used to communicate with it (OPTIONS, GET, LOCK, PROPFIND, and POST are all examples of verbs for this process). Once the verbs are established the Office client will make a POST network call that requests the metadata for the file, adds the user’s session lock state (coauthor lock or exclusive lock) and to request to open the file from the CellStorage web service in SharePoint. If the Office client has never accessed the document before, the entire document will be downloaded from SharePoint and cached in the Office Document Cache. If the Office client has opened the file before, then it is already cached and only the changes will be downloaded. At this point, the Office file will open in the Office client. This entire process happens between a few milliseconds to a few seconds.
This is a very frustrating known issue in SP Online, and I can't really understand why we don't get an admin-tool (via PS, for example) to manage it.
My greatest concern is, what I've experienced many times, that the 10 minute timeframe MS promise for auto-unlock is simply not true and it took much-much longer to get access back to the file. Also the workaround they suggest here haven't ever worked for me. So my user (and admin) experience is that whenever this issue occurs, I have no other tools to fix it than waiting, and I have to tell the same to my users.
I now have a locked file (Word DOCX) that has remained locked for a few day. The funny thing is the user that locked it is me! I cannot edit, save, delete or anything. I have resorted to downloading an offline copy to do my work. Other complicating factors. MS Teams is overlayed on SharePoint, the MS Upload Center has run a few times and the cache is clear. Oh, and I have tried resolving this in both Teams and SharePoint itself. I remember this sort of problem back in the days of SP 2003 and SharePoint Designer was a big help in those days, sure do wish we still had that. I'll be watching this thread for solutions. ~ Doug
UPDATE:
I just unlocked the file in question. To reiterate from before, I received messages that somehow the system thought I was personally responsible for the lock out and I was unable to control this file. As mentioned, I am in an working environment of SharePoint / Teams. I had assumed that Teams was a collaboration tool layered on to SharePoint and that somehow SharePoint would have ultimate control over the file pemissions. Apparently not!
The fix in my case was to confirm I was unable to make changes from within SharePoint and then go back to Teams. Use the option "Open in Word" and not "Open in Word Online" or "Open in SharePoint". Once I had it open in Word, I went to "File > Info > Manage Document", cycled through Check out and Check In successfully. and then saved.
What this tells me is that somehow the MS Teams application is also managing check outs. One other possibility I am not able to confirm is that OneDrive for Business is somehow involved when storing the offline temproary file.
I still plan to watch this thread. Best of luck, ~ Doug
- Stephen SnellJun 16, 2021Copper ContributorThis works, sometimes... for me. How to accomplish the same with Power Automate for a file in SPO document library is the tough one for me.
- tauseefshApr 01, 2021Copper Contributor
This is excellent solution. Thank you Doug Powell
- FSafaieFeb 07, 2020Copper Contributor
Thank you Doug Powell . Your solution helped me to unlock a PowerPoint file.
- RstegliOct 07, 2019Copper Contributor
It totally works - thanks.
The file I was trying to edit was locked by me. Probably due to freeze at one point, which made me hard close the app.
I went to Start Menu and right click on Excel to open this file on desktop from history list.
Went, as you said, to "File->Info->Manage Workbook and check the file out from there. Worked perfectly!
- GlennHuangJun 04, 2019Copper Contributor
Doug Powell Thank you for your post 2 years ago! It just worked after many frustrating minutes of the same around and around with Sharepoint and moving a file because of a file lock. Very much appreciated you sharing your experiences--it helped me and hope it continues to help others. I hope MS fixes this with more helpful error dialogs, but in the meantime, thanks! :)
- charlie1303May 15, 2019Copper ContributorIs anyone having this same problem in Edge. Was having the same 'File is locked' issue in Chrome but not experienced it so far in edge?
- charlie1303May 15, 2019Copper Contributor
AJWOODY can you please add a screenshot of how you checked into the document library after checking out
Thanks
- AJWOODYMay 01, 2019Copper Contributor
Thank you! Doug Powell Had the same issue, but without the interface to Teams. Was able to fix by checking out, checking in through the SharePoint document library. Very Helpful!
- Melinda Cozza-RouthMar 26, 2019Copper ContributorThat worked for me! :)
- Chris_KlestMar 12, 2019Copper Contributor
After opening the Word document in Word, clicking File, clicking Manage Document, "Check Out" is grayed out. So, I'm unable to checkout/checkIn. I created the document, I am one of the owners of the MS Teams group, and from within properties it says the file is locked by me.