How to get the site url for a given group in MSGraph?

Manjusha Mangaonkar 20 Reputation points Microsoft Employee
2023-06-10T00:10:28.9333333+00:00

We (OneNote services) are currently using the below AADGraph endpoint to get a DirectoryObject in the response that has sharepointResources like SiteUrl

https://graph.windows.net/{tenantid}/groups/{groupid}?api-version=1.5-internal

Our code location is at Our code location is at https://office.visualstudio.com/Office/_git/Office?path=/oneservice/shared/storage/Common/Src/Communication/OneDriveForBusiness/AadGraphProxy.cs&version=GBmain&line=816&lineEnd=873&lineStartColumn=4&lineEndColumn=6&lineStyle=plain&_a=contents

What is the equivalent option to get the Site Url for a given group and tenant in Microsoft Graph?

Thanks,

Manjusha

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,825 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,214 questions
0 comments No comments
{count} votes

Accepted answer
  1. TH-4749-MSFT 3,305 Reputation points
    2023-06-13T16:38:08.0733333+00:00

    Hello Manjusha Mangaonkar,

    Thanks for reaching out. To get a site webURL for a group you can use the below query:

    /groups/[GroupId]/sites/root?$select=webUrl

    For the default Tenant site webURL you can use the below query:

    /sites/root?$select=webUrl

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

    Thanks.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.