Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

sharepoint is locked for shared use by

Like (0) ShareShare
ReportReport
Posted on 22 Sep 2022 09:03:54 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 

  • Expiscornovus Profile Picture
    31,652 Most Valuable Professional on 23 Sep 2022 at 09:45:39
    Re: sharepoint is locked for shared use by

    Hi @abc3,

     

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

  • Verified answer
    abc3 Profile Picture
    207 on 23 Sep 2022 at 09:31:21
    Re: sharepoint is locked for shared use by

    @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
    31,652 Most Valuable Professional on 23 Sep 2022 at 07:48:12
    Re: sharepoint is locked for shared use by

    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?

  • abc3 Profile Picture
    207 on 23 Sep 2022 at 00:32:40
    Re: sharepoint is locked for shared use by

    @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
    31,652 Most Valuable Professional on 22 Sep 2022 at 09:34:20
    Re: sharepoint is locked for shared use by

    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/

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 55

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 39 Super User 2025 Season 1

#3
VictorIvanidze Profile Picture

VictorIvanidze 26

Overall leaderboard
Loading started
Loading started