web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / I finally solved the "...
Power Automate
Answered

I finally solved the "sharepoint is locked for shared use by (...)" error when updating a sharepoint file

(1) ShareShare
ReportReport
Posted on by 21

Been getting this error for AGES now, and never managed to solve it. Once i stumbled upon it once again, and after hours os trying to solve it, I finally did it.

Categories:
I have the same question (37)
  • Verified answer
    Fer_Santello Profile Picture
    21 on at

    This error happens when THE FILE YOU'RE TRYING TO UPDATE HAS USERS THAT CAN'T VIEW THE FILE, in other words, users that can't access the specific file. That's why some people get this error and other people don't and it appears to be random.

  • jleystral Profile Picture
    97 on at

    But what was your solution? Did you just give all users reading permissions?

  • jswhite Profile Picture
    10 on at

    would also love to know what your solution was

  • gg8 Profile Picture
    9 on at

    I had this issue this morning. I had an excel spreadsheet that I edited and needed to re-upload but the system said "error: the file is locked for shared use by (my email)." What worked to fix it was to open excel and find the item I edited from the recent list (it showed the pathway like "SharePoint page > reviews library"). I then opened this document. Then I went to the file tab > select close. Then when I went back to the library, it let me reupload and change the properties -- the error was gone. 

     

    I hope this helps!

  • maxpower45255 Profile Picture
    223 on at

    @Fer_Santello Do you like to torture the poor developer community who's already under enough stress? 🙂 Can you describe the fix clearly? Your comment describes the "What" of the problem but not the "HOW" to fix it.  

  • maxpower45255 Profile Picture
    223 on at

    The fix that seems to have worked for me is adding a delay between the time I opened a file on a file share and the time I dropped it/created the file in Sharepoint. Also, I didn't notice this issue with small size files. However, when the file seems large enough, the 'sharing' exception occurs.

    There is no "Delay" or "Sleep" action in cloud flows (yet). Instead, you can achieve the same thing by adding a "Do Until" operation and increment a counter variable within the loop. Doing addition up to 200 seems to take about 20seconds. So that was good enough for me. Your mileage may vary. 

    Here's a another helpful article that gave me the hint. 

    SharePoint 2019 - 'Document Locked for Shared Use by [Me]' - Microsoft Q&A

     

    Hopefully MSFT puts a fix to this odd behavior. 

    Good luck. 

  • jgonzo220 Profile Picture
    5 on at
    Thank you for this! I had the same error today and your solution worked perfectly.
  • gg8 Profile Picture
    9 on at

    Happy it helped!! 🙂

  • AndreC42 Profile Picture
    2 on at

    This solution worked for me:

     

    How to clear annoying Excel file locks in Power Automate – CleverWorkarounds

  • MA777 Profile Picture
    4 on at

    Thank you! Your solution worked like a charm. You saved the day and my sanity! Sharepoint drives me nuts.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard