I am trying to access the files in the sharepoint recycle bin which are deleted by other users but when i use sharepoint API to fetch recycle bin data, its only giving me data deleted by me only. I have given Site Access ‘Full’ and I can see files deleted by others in the Recyle Bin UI but not through recycle bin API. Please help me guys.
The SharePoint API only returns the recycle bin data for the user who is making the API call. It does not return data for files deleted by other users. This is the default behavior of the API and cannot be changed.
If you need to access recycle bin data for files deleted by other users, you will need to use a different approach.
One option is to use the SharePoint Online Management Shell and the Get-SPODeletedSite cmdlet to retrieve the deleted site collection.
Another option is to contact Microsoft support to initiate a full site collection or sub-site point in time restore if files have been hard deleted, corrupted, or infected with malware and are unrecoverable using the methods described above.