cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alexlee1
Regular Visitor

File "Cannot be moved because it is in locked mode"

Tried to upload a excel file to sharepoint folder. After read the email addr in the excel file and get the approval from email owner, I am trying to move the excel file to anther folder, but the move action failed.

 

If I don't read the excel content, the excel file can be moved successfully. Is the any lock from system and how to solve it.

 

Any suggestion, thanks.

{"status":400,"message":"File 'Shared Documents/Submitted/xxxx.xlsx' cannot be moved because it is in locked mode.\r\nclientRequestId: 2e86bxxxxxx\r\nserviceRequestId: 2e86bbxxxxxx"}

s1.png

From the below, there is no user check out the file.

s2.png 

5 REPLIES 5
yashag2255
Dual Super User II
Dual Super User II

Hi @alexlee1 

 

This error occurs if the file is open in edit or read mode in the browser. Can you close the file and try once? Also, there could be a chance that one of the team members that have access to the file may have it open in  the browser and it will pop the same error. 

 

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!

@yashag2255 Many thanks. There is no other team member visit this site at all. And I just upload the file without opening. 

 

Any suggestion, thanks.

@alexlee1 you can use solution that I wrote up on this post:

 

https://powerusers.microsoft.com/t5/Building-Flows/Power-Automate-Handling-Document-is-locked-for-sh...

 

Create a loop that waits for the file to become free and then executes the action. If you get stuck reach out and I will help you put it together.

@Paulie78 Thanks for the answer. Tried to follow the suggestion, but 'update file property' get error and stop.

s1.png

 

The "message" is 

{
"status": 400,
"message": "The file \"https://cloudxxx.sharepoint.com/sites/xxxx/Shared Documents/Submitted/xxxxxx.xlsx\" is locked for shared use by xxxx@xxxxxxx.\r\nclientRequestId: 2017b....\r\nserviceRequestId: 2017bb...."
}

The email addr is from myself, but I only upload without opening.

Also tried to change the setup of 'update file property', when run get anther error.

s2.png

s3.png

When trying to delete the file from web UI, it sometime said is locked. Is there any way to force unlock. 

 

Also tried 'check in'/'discard check out'/'stop sharing...' functions in sharepoint, still not work.

 

Any suggestion, thanks.

 

 

 

 

 

Yes, you need to configure the step after 'update file property' to run even if 'update file property' failed. Take another look at the screeshot ( https://tachytelic.imgbb.com/ ) :

 

Wait-Until-File-Is-Not-Locked.png

 

So the "Set Variable" step needs to be configured to run even if "Update File Property" failed. In this way the loop will continue until it no longer reports that the file is locked.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,490)