It is time for a classic SharePain today.

Locked for shared use

You open a document in Office online and edit the document. Then you try to rename is and you get the following error message:

The file “Document.docx” is locked for shared use by

The file "Document.docx" is locked for shared use by

I tried the same by renaming the file in the modern experience

The file is locked for shared use by user


When you try to open the document in word things just disappear in a black hole and Word is never opened.

Showing a document in preview

After about 30 minutes my word suddenly opens the document as the lock seems to have expired now.

There seems to be an issue with document being locked when you open a document with Office Online

I haven’t got a real solution yet. If you do then please let me know. Otherwise watch this space as I’m still investigating.


Possible solution

Thanks to Olivier Collet for pointing out the following solutions on TechCommunity

  1. Make sure the “webclient service” on client side is running
  2. Find registry key: HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters on their machines.
  3. Find value: SupportLocking(if no, please add), set its value to 0, want to just disable lock feature.





Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as a Principal Architect at HybrIT Services Ltd. You can contact me using

22 thoughts on “The file Document.docx is locked for shared use by user in SharePoint”
    1. Hi Noel,
      That solution would only work in on-premises environments. I don’t think that the unlock is available within CSOM. Also I’m not sure if this is something that I could get end users to do every time they edit a document in Office Online.

  1. Saw this today on two different tenants.
    Once as a flow had finished doing its thing the other when I created a brand ne document online using the new button.

    Definitely a bug has surfaced here

  2. When this happens I enforce checkout on the library so I can check out, edit and check in. Removing enforce check out on the library then leaves it all working as normal. This solution is ok in a training environment as its great for demonstrating the differences between libraries with and without enforced checkout but don’t think its a real world work around.

      1. Pieter, the document is not and never has been checked out, just locked as you described. When this happens I then enforce Check Out on the library and the document is not shown as checked out. I can check it out and edit. The action of enforcing check out on the library seems to force SharePoint Online to realise the document is not actually locked in any way.

        I normally see this on training courses when creating a new document in SharePoint Online and after closing the document try to edit the properties. So the document is brand new. It seems to take between 30 mins and 24hrs to release the lock for me, unless I change the library settings as described. However I’ve only found this check out solution on a course last week and it worked again this week – twice isn’t really proof of a solid solution.

  3. Same here – started on Friday. Logged a support request with MS but even though I’ve given then step by step screenshots of how the error is caused, they insist on remotely accessing my computer before they’ll try to fix it. Which given I’m on a Mac is causing them problems…

    The different in my case is that I’m able to edit and view files, despite the lock, just not rename them, delete them, etc

  4. Hi Peter, I had similar problems like you describe. When we click new document on a library and it opens it in Office Online, you rename the document and afterwards would like to set some required meta data in the library itself, we get same error message that document is locked by yourself. We managed to ‘fix’ this by setting the following attributes on the library trough PnP provisioning: EnableVersioning=”true” EnableMinorVersions=”true” MinorVersionLimit=”100″ MaxVersionLimit=”500″ DraftVersionVisibility=”0″. Setting these options doesn’t lock the file anymore.

    Maybe this will give you some new insights or help you out.

    1. Hi Robert, I think that that is similar to Sara’s comments. I have the feeling that something has changed to the out of the box library or Office Online is not able to deal with out of the box settings. Either way this should be fixed.

      I’ve reported this to Microsoft on twitter, but I’m still waiting for them to resolve the issue. I’m hesitant changing out of the box library settings as a workaround.

      I wonder if this is related to the changes currently made to document libraries and Office Online is assuming new settings.

  5. Hi,
    we have about 100 users who work’s online in SharePoint libraries. Many of us has this locked problems, even me admin. We have a case and Microsoft India is working on this huge problem.
    When a user open a document, edit it=locked by himself
    He can’t rename, delete, move or copy it for about 1-24 h
    When you open it in desktop Word, you can see that is locked by myself, sometimes 2, 3 or more instances of the same user or other users.
    It is a huge issue for us in our organisation and we need help NOW. Users are frustrating, and Microsoft tells us every second day to wait, “we are working on a solution”…..

  6. MS SharePoint Online Team have finally updated the new version of SQL Tables and modified release times in the code(error 500 via https request).
    HTTP/1.1 423 Locked
    Cache-Control: private, max-age=0
    Transfer-Encoding: chunked
    Strict-Transport-Security: max-age=31536000
    X-Powered-By: ASP.NET
    X-Content-Type-Options: nosniff
    X-MS-InvokeApp: 1; RequireReadOnly

    We have tested our SharePoint libraries via different users and verified Connection to SharePoint Online via software Fiddler Web Debugger.

    Everything seems OK, all users can copy, rename, move, edit same file over again also…

  7. Peter:

    Did you ever resolve this? This happened to me with a document last month. A month passed, and I still cannot rename the document because it is “locked by another user” but the other user’s email address is my own.

    1. Hi Francis,
      I found that when the locks last longer than a day that there were often background processes ( like Flow, SharePoint Workflows, PowerShell or anything else locking the files). i would be interested to see the version history on this document that is locked. Are you able to email that to me?

    1. Hi Per,
      I am suspecting background processes or forgotten locks but I havent been able to find an cause for it. Badly designed Flows or PowerShell script can cause these problems.
      Do you have any background processes running?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue Reading

%d bloggers like this: