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 / Update File Properties...
Power Automate
Answered

Update File Properties in SharePoint handling locked file

(1) ShareShare
ReportReport
Posted on by 144

Hi Everyone,

 

I have a Flow which is triggered on the create or update of a document in a SharePoint library.

The last step of the flow updates the file properties. The Flow fails if the file is locked by the user. How can I force a wait and/or retry until the lock is removed to ensure the document properties are updated?

 

 

Categories:
I have the same question (0)
  • alrezac Profile Picture
    Microsoft Employee on at

    Hi,

     

    You there are a few ways that this has been answered so far but if I were you I would go with the simplest set up. Take a look at the communities post below; and copy its suggestions for your flow. It would basically run the exact same way and it should achieve what you are looking to do.

     

    https://powerusers.microsoft.com/t5/Building-Flows/retry-flow-after-failure/td-p/148790

     

    Regards,

     

    Alex

     

    -------

     

    Community Support Team _ Alex Rezac
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Verified answer
    bhitchlockfcs Profile Picture
    144 on at

    Thanks @alrez 

     

    That wasn't the right solution for my problem.

     

    https://sharepains.com/2019/09/27/retrying-after-failures-in-microsoft-flow/ gave me a good start to finding the solution.

    I found that the body of the failing step contained the error message and status code. So I added a Scope and configured it to run after the initial Update action failed.

     

    First I parsed the JSON of the body from the failed step to get the Status code, which I assigned to a variable called ErrorStatus.

    Get Error from Failed Step.png

     

    I then added a Do...Until loop set to run until the ErrorStatus was 100.

    Retry until Error is changed.png

    I repeated the update action and configured the run after fail to update the ErrorStatus.

    I then added another step configured to run after the previous step was skipped to Set the ErrorStatus to 100 to exit the loop.

     

    I will probably refine this but it's doing what I need it to.

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard