Getting Unable to retrieve user's mysite URL even if the drive exists

懵懂的女人 提交于 2020-07-10 06:48:05

问题


When querying the Graph with the PHP library for a given drive I receive 400 Unable to retrieve user's mysite URL or 429 Too many requests. When I call for example https://graph.microsoft.com/v1.0/users/b0633c25-2655-4dfe-a2b2-078e4310deba/drive with the PHP library it gives this weird result. When I query the same url in the Graph Explorer. It works like a charm.

I've set up the permissions as described in the docs and have the E3 Developers subscription that is still valid.

What am I missing?


回答1:


The current error seems like user does not have ODFB(OneDrive For Business) site created, you can check if the user have create OneDrive site(the OneDrive site will be created while the user first time to use it).

To debug that issue for now, try to use Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer# and login with your user account. If you can access /me then try accessing /me/drive/root and you will get details about ODFB Doc Lib for current user if it exist. we can get results with the following link for login-in user

https://graph.microsoft.com/v1.0/me/drive/root/children

Reference for you: https://github.com/microsoftgraph/microsoft-graph-docs/issues/1354



来源:https://stackoverflow.com/questions/51744228/getting-unable-to-retrieve-users-mysite-url-even-if-the-drive-exists

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