Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Force delete file with Sharepoint

(0) ShareShare
ReportReport
Posted on by 4
Hello,
 
I've tried to set up a simple flow.
Starting listing the content of a folder in the SharePoint site, delete the file based on its ID.
When no one is on the file, no problem, it's working.
When someone has opened it, I got the error message "File is locked by the user".
 
I've tried to add a "Send HTTP Request to SharePoint" with POST method Recycle() or lockedByUser.
This step is passed successfully but the deletion is still not possible.
 
Do you have any idea on which way I need to investigate ?
Thanks in advance
 
  • FH-20121531-0 Profile Picture
    FH-20121531-0 4 on at
    Force delete file with Sharepoint
    Thanks for your answer, it works with the DELETE method and GetFileByServerRelativeUrl
  • Verified answer
    Nived_Nambiar Profile Picture
    Nived_Nambiar 17,292 Super User 2025 Season 1 on at
    Force delete file with Sharepoint
     
    Did you tried this operation as mentioned in blog to force delete a file ?
     
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

    ​​​​​​​

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,398 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,274 Most Valuable Professional

Leaderboard