Forum Discussion
ScottBrown
5 years agoHelper II
Use SharePoint Recycle Bin as a Data Source
In lieu of the Teams File Deletion problem on or around 03/15/21 after the Teams outage issue, we had a lot of files get deleted by a rogue process with the outage. We were able to recover them via ...
edhans
5 years agoCommunity Champion
I don't think you can do this directly in Power Query. Even using SharePoint.Contents() I cannot find the recycle bin. I see at least two options:
- Every week I export the Audit Logs for the tenant to a CSV file. It has file deletion data by person. I have a report that shows all deletions across all SharePoint sites in the tenant. Then someone can view that and see if anything looks odd or suspicious.
- You can use PowerShell to export recycle bin contents for a specific site - Get-PnPRecycleBinItem (PnP.Powershell) | Microsoft Docs - that output could be dropped into a folder and a report run over that.