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

Like (0) ShareShare
ReportReport
Posted on 20 Dec 2024 16:01:42 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
    4 on 10 Feb 2025 at 16:04:24
    Force delete file with Sharepoint
    Thanks for your answer, it works with the DELETE method and GetFileByServerRelativeUrl
  • Verified answer
    Nived_Nambiar Profile Picture
    17,464 Super User 2025 Season 1 on 20 Dec 2024 at 16:48:47
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,692 Most Valuable Professional

Leaderboard
Loading started