Hi,
I have been using "Send an HTTP request to SharePoint" with the below details to delete a folder and all of its contents in one action for over 9 months now. Two weeks ago, this started failing with message that the folder needs to be empty before it can be deleted. Any ideas/workarounds to make this operational again without having to delete all files in all subfolders prior to deleting the parent folder?
Current details (specific URIs replaced with generics):
Send an HTTP request to SharePoint
Site address: https://mysharepointsite.com/sites/SITENAME
Method: DELETE
Uri: _api/web/getFolderByServerRelativeUrl('/sites/SITENAME/Shared Documents/FolderName/DeleteThisFolder')
Headers:
Prefer: bypass-shared-lock
Error returned:
"message": "BadGateway",
"status": 502,
"message": "You have to delete all the items in this folder before you can delete the folder..."