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 comput...
- 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.
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.
- Alan UmanosOct 17, 2018
Microsoft
To add to Trevor's post, any time a file is opened from SharePoint, regardless of using Office Online or the Office client, a lock state will be set. If we're only looking at opening files using the Office client, and file check out is not required in the SharePoint doc library, then the lock state is determined by the end user's Office client. If the user has Office 365 Pro Plus Click to Run, and is on the Monthly update channel, then the user will always set a co-authoring lock unless checking out a file. If on say, the Office 365 Pro Plus MSI client, then any time a user opens an Excel file from SharePoint, the lock state will ALWAYS be an exclusive lock since Office 2016 / Office 365 Pro Plus MSI cannot co-author with Excel files in the client. Because a lock state will always be applied when opening files, if a file has an exclusive lock set and SharePoint is never told the end user is done editing said file, the file lock will remain until the lock either expires or SharePoint is told the user who set the lock is done with the file. Regardless of lock type (Co-authoring or Exclusive), If a lock is applied to a file, it cannot be renamed, moved, or deleted. However It can still be copied or downloaded locally. If the Office client crashes while saving the file, or the internet connection drops, the pending file information will show up in the MS upload center where it can be pushed back to SharePoint, thus releasing the lock. - Brian SarloJul 18, 2018Copper Contributor
Hello!
I just went through this whole situation with a user who had created a file last night, edited it and shared it with two other employees who also edited the file last night.
This morning no one could edit the file due to multiple locks.
When trying to delete it said user had the file locked for offline editing.
When opening the file in local Word, the file showed it was being edited offline by said user on 4 different devices.
I found that there is a document cache in the Upload Center.
Once we logged the user in to every device they use and deleted the troublesome file from his Upload Center document cache, the file was able to be deleted.
I hope that helps someone.
Brian
- FloriszAug 20, 2019Brass ContributorOnce I removed the document from the MS Office 2016 Upload Center Cache, I was able to add a new version to the document on Sharepoint(O365).
Thank you for this tp. - SFWA_KPAug 15, 2019Copper Contributor
Brian Sarlo THANK YOU! Teams/SharePoint locked two key files that I was working on and would not release the lock. Your solution of clearing cache in the upload center solved the problem.