Delete all items in Recycle Bin
How to delete all items in a SharePoint Online Recycle Bin using a Power Automate flow. In other words, empty both the first stage and second recycle bin.
URI
Headers
Body
Not applicable
Screenshot with example
Copy/paste example
Resources
RecycleBinItemCollection.DeleteAll method
That’s it, Happy testing!
I did it exactly this way and it is only cleaning the files that were deleted by the owner of the flow. The flow interprets other people’s files, results in 200, but does not delete them. Can you help me?
This is fantastic! It also works with the method MoveAllToSecondStage() in place of DeleteAll(). That is equivalent to the “Empty Recycle Bin” in the GUI. My usage is with a file transit site between groups, where files are frequently deleted, and the recycle bin can become pretty large. In my experience items in the second stage do not count against your site storage quota (SharePoint Online), so emptying the recycle bin automatically on a schedule can be a useful way to keep ahead of quota warnings without losing the ability to restore an item if it was not properly saved to a permanent home before deletion.