Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Provision a modern team site programmatically via Flow

Hi everyone, I'm attempting to programmatically create a modern team site via Flow using the SharePoint Online REST API described here using the Send an HTTP Request to SharePoint action. This is the action I've started with, but I get the error "BadGateway". Any help would be much appreciated, thank you.




Community Support
Community Support

Hi @swhitmore ,


As far as I know, Send an HTTP request to SharePoint action needs to specify the Site in Site Address field and then do some operations on the existing site.

And your need is to create a new team site, it seems that this action is not applicable to your scenario.


You could consider using HTTP action to create a modern team site.

Please refer to following blog, and see if it helps:


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-bacao-msft ,


I'm actually trying to provision the Group from flow, not just the team in Teams. So I'm looking for a HTTP REST API that would create the Group and SharePoint Modern Site

Helper V
Helper V



You can create Moder SharePoint sites without calling REST API. Please review this article for more information.


This article described how to do it with the help of Plumsail SP connector, which is a part of Plumsail Actions. Note, this is a paid solution.



Thanks @anton-khrit. I was aware of this 3rd party action, however I was hoping to avoid it as I don't have administrator access for our SharePoint Tenancy and I'm not sure they will approve 3rd party tools and access.

Don't know if it's allowed to link my own website but I just wrote a blog about this: Create a new Team with Forms and Flow

I describe how to use forms and flow (and graph) to create a team. With this you also get the modern sharepoint team site. I'm also planning on writing a blog about creating a communication site with forms, flow and the sharepoint rest api...

Thanks @dvdalen . Would this require admin rights on the SharePoint tenancy?

Hi @swhitmore ,


Your app registration needs the Read and write all groups rights. And this right needs to be granted by an admin, see: under Application permissions

Hi @swhitmore 


How is your PowerShell? An alternative method which is becoming more common is to use Azure Automation, and to build your modern team site using PowerShell in an Azure Runbook. It will give you more control over what you do with the site as and when it's provisioned.


Just thought I'd throw an additional option into the ring 🙂

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!

Proud to be a Flownaut!

Community Leader: Black Country PowerApps & Flow User Group

Helpful resources

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (80,304)