Forum Discussion
Brent Ellis
Apr 04, 2017Silver Contributor
Cannot Release Lock on SharePoint Online File
SharePoint thinks a user still has a lock on. I can't adminsitratively do anything with the file online. This has been going on for almost a day.
We've cleared cache, closed Excel on his computer, cleared out some local cashe directories, rebooted, etc.
Nothing is clearing up this lock.
All I want to do is delete the file at this point, and I can't even do that.
What are my options as a Global Admin?
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.
- danaldCopper Contributor
I have the same problem. In my case, it happens whenever I try to open a sharepoint file in excel, and excel always replies with a message saying the "the file is corrupt and cannot be opened" (translated). But this is not necessarily the problem.
What I found: The mechanism seems to work by IP. So, if I work on my notebook using Wifi and then open the document in the browser excel, and then I dock to my workplace and have another network, I can't release the lock anymore that comes from the wifi. Even worse: if I opened it from my homeoffice place, I cannot release that lock anymore from my office workplace...
So, the workaround for me (case 1) is to temporarily undock my device, then close the online excel browser tab, and then dock my device again.
- Geiger95Copper Contributor
Brent Ellis I couldn't find any way to do it through SharePoint directly. However I did find a way to use PowerShell to release the lock. The command is ReleaseLock
as in...
$item.File.ReleaseLock($item.File.LockId)
I wrote about it here...
- dk2007Copper Contributor
I also had this issue. Here are the steps that worked:
- open file in browser-> edit and save
- open file in desktop app ->upload failed error
- go to file->manage->checkout->edit now possible
- KellyX3Copper Contributor
K so I had a similar situation where I wanted to rename a word doc and I kept getting an error that the file was locked by my own user account. I was not able to delete the document for the same reason.
I logged off and back on thinking that would clear... it never.
I finally opened the word doc on line then chose the open via desktop option. From there I did a "save as" and changed the name and re-saved it to the same SharePoint site.
At that point I was then I was allowed to delete the old file.
Not sure why this worked but it did.
Hope this helps someone else.
- FloriszBrass ContributorI'm glad you were able to save your document, but you killed the versioning by deleting the original file and upload a new one. Also realize that if you shared the doc, the original link will be broken.
- Jose Angel Bolaño RucabadoCopper Contributor
I've just had the same problem Brent Ellis but in a Modern Experience Library and none of the answers of this thread helped a bit. Anyway I've managed to "move" the item to my OneDrive using the new-ribbon option. That worked and allowed me to finally delete the document.
Probably not an solution for other use cases but it worked for me. I hope this helps to some other SharePointers. ;-)
- Devis
Microsoft
This is very frustrating :-( I've tried all the suggestions above, from Mac and Windows, no luck. There's this Word doc on SharePoint Online, locked by me, which I can't rename or move. - GustavCCopper Contributor
SharePoint Online, had this issue with a word file with "abc" written in it. Because I had locked it I could not edit the file in word online, edit the properties in Sharepoint online or delete it. And I had no idea where to deactivate the "Lock".
I found the solution for my case in this thread somewhere- Open it in word local on PC and there i could edit the files.
Cause of the issue: I was testing some list features with a lot of basically empty word files in it. And I might have had word online open in that word document when I added another column to the list that was mandatory to be filled out..
But I'm not 100% sure on this because I'm old and some times I set of to do something just to end up looking into the fridge realizing I'm not hungry I struggle to remember what I was supposed to do..
- Joe McGiven CorbanBrass Contributor
For one library and group of users, we have configured it to open files in their native app. Therefore, the Word Online is bypassed directly for the Word App. These users don't appear to have the File Lock issue anymore.
Has anyone else noticed this? Does anyone else have a Library whereby the default is set to "Open in Client Application" and doesn't have the issue with docs in that Library?
My guess is that previously the Word doc opened in online mode, then they clicked "Edit in Word" and so it's opened in two places. They'd edit in Word, but something may have occurred (a cursor move, etc) whereby the Online version of the same doc was 'edited' too - and that this *duopoly* is what causes the issue.
It's my assumption that this is what causes the File Lock issue and what needs to be focused on.
- John LathburyBrass Contributor
I particularly love this error combination.
Excel says I'm the only one here, but I can't make changes since I'm not alone...
- Andrew SilcockSteel ContributorWe're getting the locked out issue again today, by restoring a previous version and then restoring the correct version, this resolves the problem.
Microsoft needs to fix this permanently though.- Deleted
it seems my PC is smarter than yours and won't be bluffed - that didn't work for me :(
- Susan McClementsIron ContributorThis is funny but also frustrating!
- Chan tranCopper Contributor
try this,
Open the file in office client in read only mode. As soon as it opened in the office client, then check it out.