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 / sharepoint is locked f...
Power Automate
Answered

sharepoint is locked for shared use by

(0) ShareShare
ReportReport
Posted on by 207

I am trying to build a automate to delete sharepoint excel but it show  is locked for shared use by xxx(it is myself) [membership]

Did anyone know how to solve the problem without using retry 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @abc3,

     

    Did you try a do until pattern like for example described by Tomasz Poszytek:

    https://poszytek.eu/en/microsoft-en/office-365-en/powerautomate-en/locked-file-checking-pattern-in-power-automate/

     

  • abc3 Profile Picture
    207 on at

    @Expiscornovus  it just retry and retry until it success but in my use case the automate was called by powerapps i cant let the user wait unit it was success 

  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @abc3,

     

    Unfortunately, that is the nature of a file lock. Either somebody has it open and is working in the file, which means you cannot delete it. Or some process still has a handle on it (like a Word client) and you have to wait until that lock is released. 

     

    Just to double check. Is it a file you have created within your PowerApps or is it just some random file within the SharePoint Online environment?

  • Verified answer
    abc3 Profile Picture
    207 on at

    @Expiscornovus  I found the solution 

    https://www.cleverworkarounds.com/2021/02/21/how-to-clear-annoying-excel-file-locks-in-power-automate/  Thank you for your help

  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at

    Hi @abc3,

     

    Thanks for sharing, didn't know you could use a bypass-shared-lock header 😀

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 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard