
Hi @Tarun koshy ,
- As said in that article, you will no longer be able to access any shared content in the OneDrive after it moves to the recycle bin. So, you will be unable to fetch the OneDrive site through the API after it moves to the recycle bin. However, during retention period, you can still fetch OneDrive site through the API.
- The $filter operators doesn't include contains as of now in Graph API. It seems to be impossible to filter out only the OneDrive sites. As an alternative, we can use PowerShell to access those sites. Please take a reference to this article: Create a list of all the OneDrive URLs in your organization using Microsoft PowerShell. It is correct that we cannot fetch user id any more using API after deleting the user, but we can record the user id in advance. As per my test, we can still use Get
v1.0/users/{user-id}/drive after deleting the user. What you need to do is record his user id ahead of time.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.