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 / Recursive delete folde...
Power Automate
Unanswered

Recursive delete folder in sharepoint with MS Flow

(0) ShareShare
ReportReport
Posted on by

Currently, I am trying to delete a folder that is not empty in sharepoint, in a shared library, I have been looking at other possible solutions in this forum, but none has worked for me, as it was using the activity to delete files or items, and it has not worked in my sharepoint. I have seen that the folder could be deleted via http, with the DELETE method and with the URI _api/web/GetFolderByServerRelativeUrl('Folder') but I get a 400 error.
Another option that I have done is to use the POST method and pass in the header the parameter "X-HTTP-Method": "DELETE", but it didn't work either.
Any other idea that I can try?

 

Best

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    You need to provide the relative url to the folder. Just the folder name wouldn't work.

    _api/web/GetFolderByServerRelativeUrl('/sites/YourSiteName/YourDocumentLibraryName/FolderName')
  • Suggested answer
    CU03091917-0 Profile Picture
    26 on at
    Yet another half-fast, incomplete answer.  Does anyone have a clear, concise how-to on Sharepoint folder deletion?  Is there a way to turn off checking for items in the folder before deleting so it will work like its supposed to?

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard