Get items permissions in OneDrive for Business usi

2019-09-03 10:44发布

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.

0条回答
登录 后发表回答