How can I create an office 365 group with managed path "/teams"?

Brass Contributor

I love the PnP Powershell cmdlets to provision new office 365 groups.


Is there any possibility to create an office 365 group in the /teams path?

New-PnPUnifiedGroup always creates the groups under the /sites path.





3 Replies

Please refer to a previous techcommunity Post below which provides answers.


For those who weren't able to find the option:

- under https://[yourdomain], go to settings

- in SPO settings, head down to Site Creation

- change it to "Show the Create site command to users who have permissions to create sites"

- additional options appear, with descriptions. We chose the middle option (A site with an O365 Group)

- set the default "Create groups under:" to teams

- we added a secondary contact requirement

- save



- You'll need to use PowerShell to update your secruity group on who is allowed to create sites, most won't want to open this to all staff. There are some default groups that will remain able to create O365 groups (Office 365 Global admins, Mailbox administrator, Partner Tier1 and 2 support, and Directory Writers)

- Microsoft Support Page

- Once you set the default to "/Teams/", O365 groups created from the O365 Admin portal will default to teams as well, without the option to create them in "/Sites/".

- If you revert the change back to "Hide the Create site command", the default returns to "/Sites/".


Hope that helps!

Thanks for the link to the related post. I have the same requirement as mentioned by Darren. We would like to use both paths /teams and /sites. Changing the default doesn't help.

Did you ever find a solution for this? I agree that having every possible create group command (whether Graph or PNP) just lean on the default tenant setting is worthless.

By default sites created through the SharePoint interface should have defaulted to /sites/ and teams created through the teams interface should have defaulted to /teams/. At least that would have been logical.

But more so I want the option to specify the URL of the site/group/team that I'm generating with powershell (like it has always been). The absence of this parameter has caused us hundreds of lines of code working around this mess to create a disconnected site, turn it into a group and then a team.