Finding files in SPO recycle bin

Respected Contributor

what is the trick for finding specific files in SPO recycle bin? we can only sort by title and date deleted, there is no filtering and when there are thousands of files, it is an endless scroll which is unusable.

11 Replies
I'm bumping up this old thread because I have the same question and have gotten no where in my research. Is there really no way to search the recycle bin?

I've found this UNTESTED and (relativelly) old powershell script search option, that we'll explore in our team.

As recycleBin is now the only Back Up management mechanism in SPO, it is almost indispensable to make it more efficient. At the moment it works that's it. Good search / filtering mechanism would make it great.

We had an incident where a user misunderstanding onedrive synchronisation just deleted ~7000 files from his synced folders (Sharepoint). Was hell to find all these mistakenly deleted files (as other files were also rightfully deletes in the middle).


Did someone find out how you can select files from the recycle bin to remove (filter on user, sort on file size etc.) @Dean Gross 

@Dean Gross You can use PowerShell to export the recycle bin items to a csv file and use excel to filter on dates, users, etc.

All you need to do is install the SharePoint PNP Powershell module and run the following:


Connect-PnPOnline -Url https://<sitecollectionurl/
Get-PnPRecycleBinItem -firstStage | export-csv <filepath>

@JSleithanks for the suggestion, that will help the SPO admins, but it won't help the site owners who can't use POSH. Microsoft still needs to address this basic level of functionality in the UI.

@Dean Gross


and you also also filter by directory name : 


$_.DirNAme -match "sites/…."

@Eric LE CORRE  thanks for the additional suggestion, but this won't help the site owner who is trying to find a file that was deleted. Site owners are empowered to do almost everything, they should not have to open a support ticket with their Help Desk to do something this simple

Agreed this functionality needs to be accessible to Site Collection Admins. Please add to top priority

@Dean Gross 

Can we run a similar command to export the items from the Second Stage recycle bin of a users' OneDrive recycle bin?  Also do you know if we can run a Flow that checks for items in a users OneDrive Second Stage recycle bin?

@csesti-Jabil you can use the same command with the Second Stage switch

Get-PnPRecycleBinItem -SecondStage