I am trying to run Graph queries to GET Enumerate the document libraries under the root site, it is not giving me any values in the Response Preview.

Devra, Poornima 0 Reputation points
2023-03-06T13:37:26.7233333+00:00

I am trying to run Graph queries to GET Enumerate the document libraries under the root site, it is not giving me any values in the Response Preview. I have attached the Screenshot for your reference.

User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
843 questions
Microsoft Graph Permissions API
Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
321 questions
Microsoft Graph Site Lists API
Microsoft Graph Site Lists API
A Microsoft API that "supports access to SharePoint sites, lists, and drives; read-only support for site resources; read-write support for lists, listItems, and driveItems; and address resources by SharePoint ID, URL, or relative path.
293 questions
Microsoft Graph Teamwork API
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Shivam Dhiman-MSFT 5,036 Reputation points Microsoft Vendor
    2023-03-06T16:16:29.4433333+00:00

    Hi @Devra, Poornima

    As per the documentation, these are the permissions required:88

    As you are using Get sites/{site-id}/drives please make sure you have consented Files.Read.All & Sites.Read.All before using the above Graph API endpoint.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

  2. CarlZhao-MSFT 20,376 Reputation points
    2023-03-07T02:20:19.47+00:00

    Hi @Devra, Poornima

    It seems that you have not consented to the corresponding delegated permissions under the Modify permissions blade.

    25


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation) to enable e-mail notifications if you want to receive the related email notification for this thread.