Get items permissions in OneDrive for Business using microsoft Graph API

冷暖自知 提交于 2020-01-07 01:49:07

问题


Context

I'm trying to get the permissions granted on items in personal OneDrive for Business drives using the Graph RESTful API.

Querying the OneDrive for Business:

GET: graph.microsoft.com/v1.0/drives/<driveID>/items/<itemID>/permissions. 

and :

GET :graph.microsoft.com/v1.0/drives/<driveID>/root/permissions/<itemID>

I'm getting the following error :

"code": "-2130575138, Microsoft.SharePoint.SPException",
"message": "MountPoint security error: host web isn't a personal site"

However, if I send the following request :

GET: graph.microsoft.com/v1.0/drive/items/root/permissions

I get the permissions on my Sharepoint online site. So it works for sharepoint online but not for OneDrive.

Question

How can I retrieve full permissions info using the Graph REST API?

Thanks.

来源:https://stackoverflow.com/questions/34394461/get-items-permissions-in-onedrive-for-business-using-microsoft-graph-api

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