Find DriveID on my Sharepoint site with the siteID

Jørn Herbrand Dølving 20 Reputation points
2023-08-01T18:27:28.18+00:00

I am using the Graph Explorer to try to find the DriveId on a newly created Document Library.

First I have found the SiteId wit this enpoint: https://graph.microsoft.com/v1.0/sites/merverdi.sharepoint.com:/sites/MerVerdi-Drift

Then I get this result;

"id": "merverdi.sharepoint.com,5c0b1d43-b4ba-4948-a821-69ca58e6f4a2,7d50350a-4a91-4b27-b697-faf123919248"

I then try this endpoint: https://graph.microsoft.com/v1.0/sites/5c0b1d43-b4ba-4948-a821-69ca58e6f4a2/drives

But the result that I get is this:

"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives",

"value": []

What am I doing wrong?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. msft-gu 1,355 Reputation points
    2023-08-01T23:06:36.73+00:00

    Hi,

    Good afternoon and thank you for your question.

    I reproduce it on Graph Explorer by using: https://graph.microsoft.com/v1.0/sites/mydomain.sharepoint.com:/sites/SPOSite

    Then I used the ID: https://graph.microsoft.com/v1.0/sites/mydomain.sharepoint.com,abcd1234-ef56-78gh-abcd1234,wxyz0987-65wx-43yz-wxyz0987/drives

    I make sure that the correct permission is also assigned to me as per article:

    https://learn.microsoft.com/en-us/graph/api/drive-get?view=graph-rest-1.0&tabs=http

    Please let me know if I answered your question. If it is, please upvote and accept this as an answer. May you have a great day ahead!

    2 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Jørn Herbrand Dølving 20 Reputation points
    2023-08-02T07:42:44.3633333+00:00

    Many thanks for your answer.

    I checked under my avatar in Graph Explorer, and the status on all Files and Sitres permission are Consent.

    Should that not be enough permissions?

    0 comments No comments

  2. Jørn Herbrand Dølving 20 Reputation points
    2023-08-02T17:38:55.1466667+00:00

    I just found out how to consent to permissions.

    You put me in the right direction, so thank you


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.