0
votes

I work with SharePoint Online drives(document libraries) with Microsoft Graph API (/drives call). With this API I can download/upload files but cannot work with permissions.

That's not a problem - I can do it with SharePoint Online REST API (with calls _api/web/GetListByTitle('Title')/hasuniqueroleassignments).

The main problem here is matching drive from MS Graph API and a corresponding list from SharePoint REST API. For now I match by title but I have several examples, when name field in MS Graph API is equal to "OneDrive", but title in List entity is Shared Pictures.

My question is: is there any way to match more precisely entities from Graph API and SharePoint REST API?

Thank you.

2

2 Answers

0
votes

The Drive Item object has a SharePointIds property that will provide the information necessary to call the SharePoint REST API.

https://docs.microsoft.com/en-us/graph/api/resources/sharepointids?view=graph-rest-1.0

0
votes

Use List resource, you could get list id.

Then use id to call rest api.

/_api/web/Lists(guid'54ca94c0-364e-4201-8fe7-a4c804769009')/hasuniqueroleassignments