0
votes

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.

You seem to be missing another example (after 'However, if I send the following request'). Did you have a scenario that did seem to work? - Brad
In the response headers you'll find a request-id header. If you can include the value from that header I can take a look at what's going on here. - Ryan Gregg
Hi, Thanks for responding. Brad: I've added the missing example: 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 for Business. RGregg: This is the request-id from the response header: 1ef8296c-b4e8-4051-b64a-923ecc733379 - Hanan Levy
Can you also send the timestamp please? We always need the timestamp and the request-id from the response header. - Dan Kershaw - MSFT
Response Headers: Cache-Control: private Transfer-Encoding: chunked Content-Type: application/json Server: Microsoft-IIS/8.5 request-id: 12bf547d-a425-4ab9-a9f7-9854f0484870 client-request-id: 12bf547d-a425-4ab9-a9f7-9854f0484870 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"South Central US","Slice":"SliceB","ScaleUnit":"000","Host":"AGSFE_IN_3","ADSiteName":"SAN"}} OutBoundDuration: 1345.5894 Duration: 1359.6689 X-Powered-By: ASP.NET Date: Sun, 10 Jan 2016 13:22:24 GMT - Hanan Levy