问题
While the endpoint works fine to get details of my own OneDrive I am having trouble using Microsoft Graph to get the status of another user's OneDrive. i.e. Do they have one, have they added any files.
First, I create a new user account.
Then, using Microsoft Graph Explorer I log in as myself, (an administrator) and I request:
https://graph.microsoft.com/v1.0/users/{user-id}/drive
This returns
{
"error": {
"code": "ResourceNotFound",
"message": "User's mysite not found.",
"innerError": {
"request-id": "6c2f1d09-ebb1-49fe-83ac-46caf946eefa",
"date": "2017-11-02T17:55:45"
}
}
}
If I then log in as the user and access her OneDrive via the web and retry the same endpoint it returns:
{
"error": {
"code": "itemNotFound",
"message": "The resource could not be found.",
"innerError": {
"request-id": "aecda4bb-4baf-42ab-81f0-ce9e3b959dd8",
"date": "2017-11-02T17:59:41"
}
}
}
Shouldn't it return the id of the drive here instead? I am requesting all permissions when signing in via Microsoft Graph Explorer.
Thanks for your help!
来源:https://stackoverflow.com/questions/47081881/cannot-access-onedrive-details-for-another-user