cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Write to file on sharepoint: "Graph API is unable to acquire or refresh a lock on the file because it is already locked. Please close edit sessions and try again."

I want to dump a sharepoint list into an excel file every time it changes. I have set it up as in this post:

 

Get Items > For each (Value) > Add rows to a talble (Excel for business)

 

I've connected to sharepoint and selected the file and table. When I run the script I get:

 

Graph API is unable to acquire or refresh a lock on the file because it is already locked. Please close edit sessions and try again.

 

When I modify the flow, the table name will often disappear and I won't be able to select the table name again. 

 

What could be the issue here?

6 REPLIES 6
Highlighted
Resolver III
Resolver III

Hi Robin, 

 

I cannot open the link you provided, so cannot see what your Flow looks like. Could you provide some more information on your Flow actions? 

Highlighted
Community Support
Community Support

Hi @RobinV86 ,

 

The link you provided could not be checked. Could you share it again?

 

According to your description, I have set up the flow likes below. However, the issue you mentioned didn’t occur.

 

The items could be saved from SharePoint list to the Excel table successfully, even the file is open. Besides, the table name won’t disappear.

1.PNG

 

Do you have any other flows that is also trying to insert data into the Excel table?

 

Please try to recreate the flow to see if the issue still exists on your side.

 

Which browser are you using? Please try with a different browser.

 

Best regards,

Mabel

 

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

Hi Mabel,

 

I have set it up just like this, but the file lives on our corporate sharepoint (cloud based). It is almost as if the flow is not able to get access (check out) the file on sharepoint. 

Highlighted

Hi @RobinV86 ,

 

Have you shared the Excel file with others?

 

Please make sure the file is not opened by other users.

 

Could you try with a difference Excel file to see if the error still exists?

 

Best regards,

Mabel          

 

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

Hi @v-yamao-msft  Mabel

 

I am also getting the same error when, I load the excel file.  The tables within that file do not get populated.  I receive this exactly same error instead.

 

As per your suggestions, I have ensured that the file is not shared with any other users and it is not opened by any other application but excel on my laptop.

 

I have also tried to create another file with exactly same data but same error recurres.

 

Kindly help.

Highlighted

I wrote about this in my blog.   Make sure you are not editing the flow in one tab while you are running the flow in another.  There are a bunch of other reasons as well that are listed in the blog.

https://coyleonsharepoint.wordpress.com/2020/04/23/ms-flow-giving-graph-api-is-unable-to-acquire-or-...

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (8,021)