Finding files in SPO recycle bin

Silver 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.

18 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.



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

@Dean_Gross you wrote this in 2018 and as a new sharepoint user I am shocked that the recycle bin remains just as unusable and unsearchable as before...

5 years later and I still can't search in recycle bin. C'mon Microsoft!



I'm not sure how it is in other companies but many people in our one are not super tech-savvy and your solution in practise, even if simple for you, might be overly complicated. How about just making general search feature working?

@Joyce-2002 thanks. It’s things like this that don’t make any sense and make us want to go back to Dropbox. How do you design a data and work collaboration software and make it impossible to filter or search in the recycle bin??

Come on Microsoft, listen to the community, 5 years and no improvement has been done on SharePoint Recycle bin... this is the only restore mechanism in SharePoint so far for deleted files and finding files to restore is almost impossible....
It would be really nice if it had a search, wouldn't it. What I've been doing is scrolling down to the bottom and doing a control + f to search text in the path or filename on the page. :\



Lucky you, I have probably gigabytes of data to browse through. Scrolling to the bottom would take me at least half a day...