Cannot access onedrive details for another user

旧街凉风 提交于 2020-02-02 12:52:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!