Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 4 Dec 2020 09:11:47 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

  • AndresNoguera Profile Picture
    47 on 03 Apr 2023 at 22:21:01
    Re: Unable to Delete file - File is locked for shared use by me

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

  • 55552 Profile Picture
    667 on 17 Mar 2022 at 12:03:21
    Re: Unable to Delete file - File is locked for shared use by me

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

  • Community Power Platform Member Profile Picture
    on 04 Feb 2022 at 20:24:55
    Re: Unable to Delete file - File is locked for shared use by me

    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.

  • Verified answer
    Sutherland Profile Picture
    on 06 Dec 2020 at 09:13:52
    Re: Unable to Delete file - File is locked for shared use by me

    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard