OPEN TO WORK

Available for new opportunities! Let's build something amazing together.

Get the SharePoint site behind an Office 365 Group via the Microsoft Graph

Microsoft Graph Office 365 Groups
post

This post is over a year old, some of this information may be out of date.

Back in January, I wrote an article about how you could retrieve the site URL of an Office 365 Group.

Linked article: Get the site URL of an Office 365 Group via the Microsoft Graph

The way how I achieved it back then was via calling the drive end-point and parsing the site URL from the response.

While I was testing out something today on the Graph Explorer, I noticed a new SharePoint Group end-point (atm only available on the beta endpoint). This makes it even easier to get the webUrl.

Info: At this moment, I did not find any details yet about the API end-point in the beta documentation, but I am sure that it would not be for long until this is also covered.

The new API endpoint can be called as follows: https://graph.microsoft.com/v1.0/groups/<group-id>/sites/root

Here is a sample:

Show image SharePoint site URL behind a group
SharePoint site URL behind a group

When you only need the webUrl, you just have to call it as follows: https://graph.microsoft.com/v1.0/groups/<group-id>/sites/root?$select=webUrl or https://graph.microsoft.com/v1.0/groups/<group-id>/sites/root/weburl

Update

Apparently, Mikael Svenson had already posted this on his blog: Microsoft Graph adds SharePoint endpoint for Groups in the beta branch.

10/05/2017

A client discovered today that the SharePoint API end-point was not available anymore. The article has been updated with the new API endpoint to use.

Related articles

Report issues or make changes on GitHub

Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.

Comments

Elio Struyf

Solutions Architect & Developer Expert

Loading...

Let's build together

Manage content in VS Code

Present from VS Code