
To search for files in your Personal OneDrive folder within your organization, you can use the Microsoft Graph API. You can use a POST call to the endpoint https://graph.microsoft.com/v1.0/search/query
to search for a specific file(s). When the file is stored in a SharePoint site, the POST call should work fine. However, when the file is stored in your Personal OneDrive folder, you may need to use a GET call instead.
You can also use the /me/drive/special/{name}
endpoint to access special folders like the Documents, Photos, Camera Roll, App Root, and Music folders. This endpoint supports the $expand
and $select
OData query parameters to customize the response.
For more information, please refer to the Microsoft Graph documentation.