Share via

Create SPO Site via Graph API

Kerry Mo 20 Reputation points Microsoft Employee
2024-12-03T23:15:20.4666667+00:00
  1. Is there a Graph API to create a SharePoint site? If yes, any permission scopes required?
  2. Is there a way to convert SharePoint site URL to drive Id?
  3. We want to use GraphSDK within our service. Is there a way to authenticate via AAD POP token? I don't see a way from the wiki. - https://learn.microsoft.com/en-us/graph/sdks/choose-authentication-providers?tabs=csharp#client-credentials-provider

Any help would be greatly appreciated!

Microsoft Security | Microsoft Graph

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-12-04T02:53:49.7833333+00:00

    Hello Kerry Mo,

    Thank you for reaching out to Microsoft Support!

    1.According to the methods listed in the site resource document, there is no method for creating a SharePoint site. Please refer to the document for the methods about site endpoints.

    2.You can request a List of a site's drives below:

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

    You can then access the corresponding directory of the website directly via driveId:

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

    Screenshot 2024-12-04 024950

    Please refer to this document for more details:

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

    3.As stated in the documentation, there is no way to authenticate via AAD POP token.

    Hope this helps.

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

    Was this answer helpful?

    0 comments No comments

Your answer

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