cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MatthewGrantAU
Advocate II
Advocate II

Flow causing error code 423 file locked by user

Hi,

 

I keep getting error 423 locked by user in a flow since Aug 31 5:13am.

The log shows consistent successful flows until this date, and then it is only successful once every couple of hours.

 

eg:

Sep 10, 10:28 AM (16 min ago)
00:00:04
Succeeded
Sep 10, 9:58 AM (46 min ago)
00:00:04
Failed
Sep 10, 9:28 AM (1 h ago)
00:00:04
Failed
Sep 10, 8:58 AM (1 h ago)
00:00:03
Failed
Sep 10, 8:28 AM (2 h ago)
00:00:02
Succeeded
Sep 10, 7:58 AM (2 h ago)
00:00:02
Failed
Sep 10, 7:28 AM (3 h ago)
00:00:03
Failed
Sep 10, 6:58 AM (3 h ago)
00:00:02
Failed
Sep 10, 6:28 AM (4 h ago)
00:00:02
Failed
Sep 10, 5:58 AM (4 h ago)
00:00:02
Failed
Sep 10, 5:28 AM (5 h ago)
00:00:01
Failed
Sep 9, 9:58 PM (12 h ago)
00:00:02
Failed
Sep 9, 9:28 PM (13 h ago)
00:00:02
Failed
Sep 9, 8:58 PM (13 h ago)
00:00:03
Failed
Sep 9, 8:28 PM (14 h ago)
00:00:02
Succeeded
Sep 9, 7:58 PM (14 h ago)
00:00:03
Failed
Sep 9, 7:28 PM (15 h ago)
00:00:02
Succeeded
Sep 9, 6:58 PM (15 h ago)
00:00:02
Failed
Sep 9, 6:28 PM (16 h ago)
00:00:02
Failed
Sep 9, 5:58 PM (16 h ago)
00:00:03
Failed
Sep 9, 5:28 PM (17 h ago)
00:00:02
Failed
Sep 9, 4:58 PM (17 h ago)
00:00:05
Failed
Sep 9, 4:28 PM (18 h ago)
00:00:03
Succeeded

 

 

The Flow copies an excel file from an FTP source and writes it in Onedrive for Business.  This triggers every 30 minutes.

 

 

The Excel file in Onedrive is NEVER opened by any user.  Only Flow writes to the file.

I can test open and save it from Excel application and I get no lock error.

 

There is no logic problem in the flow, as the flow can work successfully intermittently, and was always successful until Aug 31.

 

 

thanks for your help, Matt.

 

 

I think the Flow ID is 299ee131-ca96-4027-bb90-1e9c949f04f2

 

Screen Shot 2018-09-10 at 10.28.42.pngScreen Shot 2018-09-09 at 08.04.01.png

49 REPLIES 49

I have a similar problem.

My scenario was super simple:

 

  1. Blank excel with a table inside.
  2. Populate that excel with insert row action (excel online) (ok)
  3. Create a new file with content from excel step 2 with a new name and differente location. (ok)
    1. Had to delay flow for 1 minute before allowing him to move next step
  4. Overwritte the original blank file (Step 1) with a blank excel file with a table. 
Spoiler
Error. File blocked by myself. 

Tried a differente approach by replacing the original file at the begining of the process but now the file is blocked.,

 

I do think Flow engineers should take a more serious approach on excel connectors, since they released a preview with a bunch of mistakes and i do mean mistakes instead of Beta testing. For instance if you try to create a file from a excel file filled by inser rows you need to delay the flow, otherwise you will get a trunced version of the file. Just as an example, but there's more.

 

I've been building a flow using excel connector for a week and its a completely nightmare. 

Dear, you need to use Excel for business. for example:
User Get Rows (Excel for Business), using this will not lock the file and after getting the rows you are not able to add or change fields in the Excel file.
You can find an example on my blog: https://blog.pronict.net/2018/12/06/ms-flow-05-buttons-excel-approvals-and-notifications/
Regards,

Frederik Bisback
Anonymous
Not applicable

Hi Frederik,

 

Thanks for your input.  The problem is that Get Rows does not support excel files with formulas. Thanks again for your input.

Sigh. I'm getting this problem too.. the retry mechanism in the Settings for the Excel Insert Row operation looked perfect.. but they don't work with this particular error. I've raised an Idea will will hopefully get some traction for getting it fixed/working with the table locked error.

 

https://powerusers.microsoft.com/t5/Flow-Ideas/Excel-retry-options-should-work-with-file-locked-erro...

Hi all

I'm experiencing the same problem. There are many threads on this topic and varying suggestions

I have a Flow that takes an Excel spreadsheet from an email attachment and copies it to a folder on SharePoint.

That file is used for a Power BI dataset so the Flow also jumps into the file and creates a table using the Create Table - Excel Online (Business) step. This is so Power BI can see the data table.

 

  • This is the only flow referencing this document
  • There is no other users accessing the file except the one running the flow.
  • I'm using the Excel Online (Business) connectors with SharePoint (I also tried the non-business connectors and OneDrive and had the same issue)
  • The flow runs every 45 minutes
  • The Flow fails at the SharePoint Create Item step

A few days ago it was running and succedding 1 out of 3 times. The other two would fail with Error 423.

Currently the Flow is failing every time with 423 and the file has been locked for over 24 hours. I even removed the folder permissions in SharePoint for the account that runs the flow and SharePoint/Flow still thinks it has it open.

 

I also tried being clever and made the Flow create a new file each time with a stripped down UtcNow() expression as a prefix. Unfortunately the Excel connectors make you select a file using the file picker and you can't use a dynamic path which would include the prefix.

 

Has anyone had any luck with the 423 error?

 

A few other reference threads

Retry-settings-for-Excel-operations-blocked-by-423-file-locked

File-Locked-Condition

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

I have the same issue as the original poster.  Others have added in issues with Excel (online) and locked files.

 

I have tried to use an email trigger to Update File Contents, but file is usually locked, when email arrives every 24 hours.  I have tried to use a File Created in Sharepoint Folder, when users upload to sharepoint rather than emailing. However the file is usually locked when they upload every day.

 

I believe the issue is with Flow not closing the connection with a file, even after a flow has completed.  Yet even when I create a file and use it for the first time, in testing, it is still locked before first use.

The same problem here:

The file is created by flow, not opened by anyone.

 
  "errors": [
    "-2147018894",
    "Microsoft.SharePoint.SPFileLockException"
  ]
 
Anonymous
Not applicable

Hi All,

I don't know if that is the solution, but at least I had that problem "423". At first I had the file only "on-line" in SharePoint and also I tried on OneDrive. But those folders wasn't sync with my PC. 

I tried in one SharePoint Folder sync with my computer and the same Flow works, then I sync the folder where it was the original file and works too.

Hope help you.

Did anyone ever come up with a proper solution for this? 

 

I'm running into a similar problem where I need to refresh a Power BI dataset (which is a published Excel workbook), however; the refresh keeps failing because it says the workbook is open.  This happens even though the Power BI dataset refresh is one of the first steps to run, and I have a 5 minute delay after it.  It's almost like the Flow is pre-staging the lock on the file or maybe it's failing to close the file when it completes.  

Microsoft?? Heeeellllooooo?  Are you out there??? It's now 2020 and this issue is still plaguing (sorry, no COVID reference intended) users.  I can't create a table using the Excel Business Connector without a 75% chance that file gets locked for WEEKS.  I've seen posts that suggest the file will unlock after an hour.....simply not true.  And please MS community manager - don't suggest to us articles that talk about how to close a file, etc.  In my instance - my flow creates the file - NO ONE EVER OPENS THIS FILE - and Flow creates the table - NO ONE EVER OPENS THE FILE - and flow then LOCKS THE FILE with a 423 error.  Guess who is locked it?  ME.  Insert Obi-Wan meme (Of course I know him, he's me).  At this stage - even adding new files and trying to use those in the flow fails immediately. Zero workarounds.  We desperately need a real answer here.  Not a link to an article written 5 years ago about how to close a file or make sure no one has the file open when running your flow.....

 

flowFail.png

 

Hi Guys, 

 

After, i don't recall how much time since the first post, i still have the problem with the "locked file."

It's frustrating that no one looks into it. PLEASE MS !!!

 

I was creating a new Flow hopping MS already solved the problem.

My scenario was::

 

I Have 2 excel files:

XXXX Blank.xlsx

XXXX.xlsx

 

I was able to:

  1. Excel Add Row into a table XXXX.xlsx (The file needs to be there already, otherwise it wont work)
  2. Sharepoint get file content XXXX.xlsx
  3. Sharepoint Create new file in a different location
  4. Sharepoint get file content XXXX Blank.xlsx
  5. Sharepoint Create new file XXXX.xlsx (To clean the table) ERROR Locked file.

 

Anonymous
Not applicable

@JBHorne 

This is not limited to 256, if you are still having this issue IM me and I will send you the fix.

I have the same problem,

 

I have a test excel file, this file only have a table, I update the table with  flow and work fine but when  I try execute the flow for second time the flow fail with 423 file locked. I try too to extract before and insert post update the excel but continue fail.

 

 

 

 

Anonymous
Not applicable

  Hi,

 

I have found a work around to this and other systems "locking" files.

 

1. Init Var I called it "locked" Set to True.

2 Create do until

             3.   Attempt file action.

             Split into parallel flows

                       If successful set VAR above to "False"

                       If not then do a delay for 1 minute (Or whatever)

 

The result can be a flow running for  awhile, but it wont do the annoying fail.

 

HTH

 

Mark

 

 

                   

 

Hello,

 

Thanks for your answer, how can I know if the control if succesful?,

 

I have done the next;

init the var with false value and then update the file properties in a while control, after update the file properties step I split the flow in two, a delay for a 1minute and set variable to true.

 

Thanks you.

 

Hello  @Anonymous 

 

I tray again with on error event for delay path  and work fine. 👍

 

thanks 

 

 

Uttam
Regular Visitor

I was facing similar issue for a simple email trigger with link to Excel file uploaded to a SharePoint library. On clicking the link, the file opened in Excel, but there were 2 extra message bars - one stating file is locked for editing and read only and other stating there is a new version of file on the server - and both message bars asking to save a local copy to save changes.

 

I faced this issue with the trigger "When a file is created (properties only)", there was on old flow using trigger "When a file is created" that was running fine.

 

I was trying to fix the new flow only as I had created several copies linked to several folders, and realized the issue later.

What worked for me is ... in the SharePoint library where the file was being uploaded, under Settings>Versioning settings, I enabled "required check out for editing". After that the two message bars are not coming anymore on opening the file.

 

It seems the flow is opening the file and closing, and without check out enforcement, this is causing a newer version to be created in SharePoint and leaving the original version locked..leading to the message bars in Excel.

shazufaraz
Frequent Visitor

I found one way to eliminate the issue of file being locked.

 

Background: I have an Excel file in a SharePoint Library. Using this file, I need to update a SharePoint List in the same site. Once the data is added, the file must be moved to Archived folder in the same library. For testing, I did not include the part of adding the rows to SharePoint list.

 

Assumptions: My file has only one worksheet with one Table. For multiple sheets, you will have to to either use Condition or loop through each.

Flow: 

1. Get Files

2. Apply to each

2a. Check out file (using ID from step 1)

2b. Get Tables (using File Full Path from step 1)

2c. List rows present in a table (using File from step 1 and Table from step 2b)

2d. Check in File (using ID from step 1)

2e. Move file

 

File to SharePoint 1.PNG

 

File to SharePoint 2 - Get Files.PNG

 

File to SharePoint 3 - Check Out File.PNG

 

File to SharePoint 4 - Get Tables.PNG

 

File to SharePoint 5 - List rows in Table.PNG

 

File to SharePoint 6 - Check in and Move.PNG

 

Hi @shazufaraz, how do you check out the file? If I have a folder "Working" in Sharepoint document folder what should I put in the libary name ? I tried to put "Shared Document/Working" but I keep getting an error "List not found". Please advise. Thanks in advance.

 

In Check out action,

1. select 'Location' as your site location (from the dropdown) 

2. 'Library Name' as Shared Document

3. 'ID' (from Get Files (properties only) action)

Helpful resources

Announcements

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!    

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!

Users online (6,808)