How to access Sharepoint communication site's document library via Microsoft Graph API?

Viewed 178

Using Microsoft GraphAPI I can access SharePoint team site document library and lists but I can't access SharePoint communication site.

App permissions added in Azure Portal:

Files.Read.All, Files.ReadWrite.All, Group.Read.All, Sites.Manage.All, User.Read, User.Read.All, User.ReadBasic.All

Endpoint used for accessing SharePoint team site:

GET https://graph.microsoft.com/v1.0/sites/{site_id}/drives

I'm calling the same endpoint for accessing SharePoint communication site, but I got a response

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives",
    "value": []
}

What permissions do I need to add for my app in Azure Portal on API Permissions tab for accessing SharePoint communication site documents and list?

1 Answers

Can you please check if you provided these permissions for Delegated permissionsand application permissions you are able to get the query results? enter image description here

Here is the link for the DOC, Hope this helps.

Related