Quick Bits: How to get the SharePoint URL for a Microsoft Team in Power Automate

Paul Summers
Oct 29, 2020

--

Working with a customer recently, we were trying to figure out how to use Power Automate to create a Microsoft Team and then capture the SharePoint URL for that Team so we could create some custom lists in that SharePoint site.

Here’s how we did it…

Power Automate flow using HTTP with AAD to call the Microsoft Graph

TLDR — we use the HTTP with Azure AD action to call the Microsoft Graph API’s Groups endpoint, passing in the ID of the Microsoft Team created using the Create a Team action. The JSON response contains a reference to that SharePoint site URL.

We use the Groups endpoint because the SharePoint site is tied to the Microsoft 365 Group, not the Team entity, and the Team entity does not actually include a reference to that URL.

Configuration of the HTTP with Azure AD action calling the groups Microsoft Graph endpoint

We parse the JSON response using the Parse JSON action and it outputs the web URL of the underlying SharePoint site as an output property.

Configuration of the Parse JSON action and the HTTP request to SharePoint action.

That’s it. Now you can do whatever you need to do with that URL.

Side note: We initially planned to use the Send an HTTP request to SharePoint action because it allows us to make API calls to SharePoint without a premium Power Automate license. However, the HTTP with Azure AD action does require a premium license so I would probably revise this Flow to use the HTTP with Azure AD action and call the Microsoft Graph lists endpoint rather than using the SharePoint REST API.

--

--

No responses yet