cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Getting error The file is locked for shared use by when updating the file properties

Using Microsoft Flow, I am trying to set default value in a metadata column "Column_1" from a sharepoint OOTB "Created By" column whenever a new item created in a document library. Document library has certain content types associated so when I create a new document by choosing a content type, the Office online opens the document in Edit mode. 

 

I am getting below error when I try to update column "Column_1" using "Update file properties" action

 

Error 423: The file <filename.xlsx> is locked for shared use by <email id>. clientRequestId:<xxx> serviceRequestId:<xxx>

 

How can I check the status of the file if locked or not? Any help is much appreciated. 

 

 

 

 

58 REPLIES 58
v-yuazh-msft
Community Support
Community Support

Hi @neeraj_bharati,

 

The error message told that the file is locked for shared use so you couldn't run the flow to Update the file properties

I afraid that there is no any way you could check the status of the file if locked or not currently.

 

Please check and see if the following article would help in your scenario:

https://support.microsoft.com/en-sg/help/313472/the-document-is-locked-for-editing-by-another-user-e...

 

Please make sure the file isn't locked and no anyone have opened the file when you run the flow update file properties.

 

Best regards,

Alice

Thanks Alice for your reply. My flow is required to kick off automatically when-ever a new file is created in the documnet library, so I needed a way to check the lock status. Since the file is created using "New" and the selecting a content type, the file gets opened in Edit mode and thus locked at that point of time. The "Update file properties"  was working fine until last friday (June 15th) but not now it is failing with error I mentioned in my original post. Has something changed in "Update file properties"

Hi there,

 

The same thing happened to me. Up until July 16, 2018, my flow ran with no errors (it does the same thing as described by the original poster neeraj_bharati. Now it also throws "The file [...] is locked for shared use by [user]...". Any ideas? Thanks!

 

Andrés

I have the same problem. I create a document from content type. It opens in the web browser and I can edit the document. The Flow initiates when document is created and in the flow I want to update the properties of the document with a new value. I get the locked by user error.

When I try to rerun the flow afterwords It works great.

How can I make this scenario to work?

Anonymous
Not applicable

I'm in the same scenario, I've tried creating a big nasty do-after sequence that loops if it cna't update the file because of lock, never seems to work consistently because it bugs the file out to where it doesn't unlock for like 24hours, cannot find a legitimate way to make document approvals work if it has to update a column on the document.

Anonymous
Not applicable

Hello, I get this same error on my flows and it comes up over 50% of the time making Flow unusable.

 

I need to be able to update columns and sometimes move files as a part of our flows and this "file is locked for shared use" causes the flow to fail at any update file properties or copy file step.

 

Are there any ways to solve this error or work around it? 

 

Also, is there a way to set up a loop to keep trying until the file unlocks it self?

 

Thanks!

Silvana

Anonymous
Not applicable

I'm getting this same issue when updating a file. 

Still looking for a workaround

Same problem to me. I have a flow working every hour. The process is like this:

1 New mail with excel arrives.

2 Take the file and create a new file in one drive with attach content. Same target file every run to update the file.

3 Create table for this file

4 Get Rows 

5 Update rows in PBI Streaming report

 

It gets stucked because the file is locked when I try to get the rows (4 step) at first run. The next Run (1 hour later) it gets stucked at create File (2 step). The next one again at step 4....

 

How can be the file locked for more than 1 hour!!

Hi @Alvarocarmona

I guess everytime you create a new excel file you reuse the same fileName ('same target file') in order to get the Excel actions work, right?

If so, I am experiencing the same problem in Sharepoint.

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter


@v-yuazh-msft wrote:

Hi @neeraj_bharati,

 

The error message told that the file is locked for shared use so you couldn't run the flow to Update the file properties

I afraid that there is no any way you could check the status of the file if locked or not currently.

 

Please check and see if the following article would help in your scenario:

https://support.microsoft.com/en-sg/help/313472/the-document-is-locked-for-editing-by-another-user-e...

 

Please make sure the file isn't locked and no anyone have opened the file when you run the flow update file properties.

 

Best regards,

Alice



Thanks for the suggested article. We have the same issues where Flow cannot update meta data associated with the review process if anyone happens to have the document open in their browser.

 

Is there any other solution/workaround where we can check if the document is locked at all before we trigger the flow. Run_History___Microsoft_Flow.jpg

 

We purposely disabled checkout so people can co-author documents but this is now causing huge problem within the business.

 

Thanks

Aegir

hjaf
Kudo Commander
Kudo Commander

I'm starting to think that this problem is caused by flow as soon as you add the Excel for business. It is important to note that this connector is in "Preview". Preview could basically mean that the function is in alpha and should probably not be used in production.

 

I get this problem with any excel file even before there is any actions done by the excel-connector, (e.g. using sharepoint update file on the excel-file) It is as if the connector make flow reserve the file, perhaps the connector forces the lock on the file at runtime prohibiting any other action to take place. It seems that only the composite excel connector can be used to read excel data dynamically (sources set at runtime), and perhaps it will remain so.. anyone tested, confirm or refute this theory?

Hi
I encountered this same problem today. I did some testing and seems totally related to Chrome. With Edge, IE11 and Firefox my flow runs smoothly. Can someone confirm please?

Thanks
B

No It's doing it to me in Edge as well. My flow checks out the file, makes the changes then checks the file in to stop this issue, but then if you set "must check out" then you have issues with adding or updating your tables in excel. so it's really a catch 22 if you need to run changes any less than about 10 minutes apart.

 

Not happy Microsoft.

Bizarr0
Regular Visitor

Same error here. Never happened before, but today one of our flows has failed because of this.

Surprisingly, the exact same flow (without any modification) has run a second time perfectly with no errors (?!). Thus, it appears to be a random issue... which is very (very) bad because it makes Flow execution unreliable.

 

Does anybody have any update about this issue?

Thank you!

Anonymous
Not applicable

Same here @Bizarr0 , random and unreliable.

Just received this error while trying to pull rows from an Excel Table using the Excel Online for Business connector, going to try via OneDrive now as it doesn't need to be public-facing.


@iAm_ManCat
My blog


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


juresti
Continued Contributor
Continued Contributor

So its 2020 now and still the same issue.

 

I have a file that is still locked for over 24 hours.

 

It must be an issue with sharepoint libraries.

 

 

Sailela
Frequent Visitor

I found a workaround:
Simply use another browser! You should now be able to checkout the file you have problems with and check it back in.
After that use your original browser.
Greetings from Germany

ChristianAbata
Most Valuable Professional
Most Valuable Professional

You need delete all permisions of the file

Frist change to the classic sharepoint view and then go to Files, and Share with.

clasic.PNG

Then clic on advance

 

bryan.PNG

An finally delete every user permition of the file.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me:
Youtube: Christian Abata
Facebook: Power Automate LA
Power Automate examples: Power Automate examples

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,744)