web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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 Microsoft Employee

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
    Microsoft Employee 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
    Microsoft Employee 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
    676 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard