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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / File locked after appr...
Power Automate
Answered

File locked after approval

(0) ShareShare
ReportReport
Posted on by 12

I'm trying to setup an Approval flow. After the 'Start and wait for an approval (V2)' step when the file is approved, the properties of that file need to be updated. This step fails very often because the reviewer has the file opened, or just recently closed, making the file apperently locked. 

 

So the flow fails on the 'update file properties' step saying (translated: The file <file URL> is locked for shared use by <name of the person who has/had the file open).

 

As a work-around on this, I applied a custom retry policy on this step, see:
Capture.PNG

 

As you can see, it should retry 90 times, every 30 minutes. But the total duration of the Flow that failed on this step is 5 minutes, so it doesn't respect the Retry Policy.

 

Any idea on how to get this working properly?

 

Thanks.

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @KRDE 

     

    You might want to consider adding a delay of X minutes or so before this action.

     

    Let us assume that a property is Approved/ UnderReview

    what you could do is, Initialise a string variable and in the value type a string of the current property (UnderReview) of the file (the property value you will be updating after the approval)

     

    after this, add a do until action and put this variable on the left side and put the value of the property that will be updated after the approval (based on our example this will be Approved)

     

    in the do until loop put the update properties action and then add a delay of 15 minutes and after this add an action Set variable and in the value select the property field from the dynamic selector. 

     

    This will keep checking every 15 mins and see that the flow runs appropriately. please not that you should configure the run after of the delay action as when the update property action succeeds, fails, skipped, timeout. 

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Pstork1 Profile Picture
    68,898 Most Valuable Professional on at

    If possible I would turn off the Asynchronous Pattern on this so that it will wait for the Approval.  but I'll need to take a look into this.  I haven't seen this be an issue yet.  Although I know it was with the builtin Request Signoff approval for a long time.

  • Verified answer
    KRDE Profile Picture
    12 on at

    Thanks for your input guys!

     

    My work-around was to add a do-until step and a parralel branch. In the parrelel actions, I configured the 'run after' so that based on if the previous action fails, or succeeds, a variable is set to either Failed or Succeed. The do until actions is configured to keep running as long as there is no success:

    Capture.PNG

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 331 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 203 Most Valuable Professional

Last 30 days Overall leaderboard