Reputation: 11
Microsoft graph APIs for oneDrive data access is not working while using admin consent method, in the same way, I can able to access mail, contact, and calendar of users of the domain.
We have created an application which is used to backup and restore the user data of the Google domain. With the help of an admin consent option we able to get all users data with the help of graph API, but while accessing oneDrive data of any user is not working. Instead, it's only fetching the admin user oneDrive data.
API : https://graph.microsoft.com/v1.0/me/drive/root
If we are calling like below then not working, basically we need to access all users Onedrive data using admin consent. Also, we gave all permission in our AAD application.
API : https://graph.microsoft.com/v1.0/{user_objectid/email}/drive/root
Help on this issue.
Upvotes: 0
Views: 335
Reputation: 1874
Your api format is wrong.
https://graph.microsoft.com/v1.0/{user_objectid/email}/drive/root
The right one:
https://graph.microsoft.com/v1.0/users/{user_objectid/email}/drive/root
Upvotes: 0