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 / Unable to Delete file ...
Power Automate
Answered

Unable to Delete file - File is locked for shared use by me

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have created a flow to read excel file from the Sharepoint site and push records into SQL Database, and after insertion, I want to delete the existing file from the SharePoint location. but getting error as "File is locked for shared use by me".

 

Attaching screenshots for the same. can anyone please help to load excel data via some other methods or resolve this error?

 

Thanks,

Mayank

 

error1.PNGflow.PNGerror.PNG

Categories:
I have the same question (0)
  • Verified answer
    Sutherland Profile Picture
    on at

    Hello Gumgih,

    From the error message, it seems that file is locked for shared use so you couldn't run the flow to delete file. 

    Firstly, would you go to the Sharepoint site to check whether you have full permission for file deletion which should be the main cause. They you could directly access Sharepoint site for file deletion operation to check whether it would work.
    Please raise an escalation if issue persists while you have confirmed full permission granted and file could be manually deleted from SP end.

  • Community Power Platform Member Profile Picture
    on at

    I know this question was already marked as resolved. However, I will like to share something that works for me when dealing with the same error.

    I used Sharepoint functions "Check out" and "Check In" to mark the file as "Available". Therefore, you are able to delete it immediately.  An example of the flow created.

    Sharepoint functions.png

    Hope it is helpful.

  • 55552 Profile Picture
    674 on at

    Good idea. I tried this, but I can't even check out the file, because it is locked for sharing (by me).

  • AndresNoguera Profile Picture
    47 on at

    Hi William, What is the condition inside of Try and Catch?

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard