Creating a SharePoint Online modern team site without an Office 365 Group
Published Feb 08 2019 12:56 PM 13.4K Views
Microsoft

First published on MSDN on Aug 07, 2018
In SharePoint Online, modern team sites are created with an associated Office 365 group, by default. Someone recently asked me if there was a way to create a modern team site without the Office 365 group. The way to do it is via creating the site via the APIs or PowerShell, and choosing the STS#3 template. If you're going to use SharePoint PnP PowerShell , you'll need to leverage the New-PnPTenantSite command to create the site. (This commandlet is for legacy site types) If you want to create a modern team site with the O365 group, or communications sites (no O365 group), you'll need to use the New-PnPSite commandlet.

7 Comments
Copper Contributor

@ronalg Thanks for the share -- trying to use API for creating modern team site without O365 group, I've used a couple of different endpoints but haven't generated modern team site only.

 

  • _api/SPSiteManager/Create -- used WebTemplate: "STS#3" and got 400 error
  • _api/GroupSiteManager/CreateGroupEx -- this created a site but as part of an O365 group

What endpoint did you use to generate a modern team site only?

Microsoft

I've personally only ever done it with PnP PowerShell, via the New-PnPTenantSite. You can see the source for that command-let here: 

https://github.com/SharePoint/PnP-PowerShell/blob/master/Commands/Admin/NewTenantSite.cs 

Copper Contributor

Thanks for the link @ronalg . After further research, it's not documented and all the examples found are using the communications site template, but we tested successfully with Flow using the endpoint: /_api/SPSiteManager/Create and the webtemplate STS#3.

 

This can create Modern Team site collection without O365 Group. Sample body:

{
"request": {
"__metadata": {
"type": "Microsoft.SharePoint.Portal.SPSiteCreationRequest"
},
"WebTemplate": "STS#3",
"Title": "showcasetest",
"Url": "https://tenant.sharepoint.com/sites/siteTitle",
"Description": "test",
"Classification": "",
"SiteDesignId": "00000000-0000-0000-0000-000000000000",
"Lcid": 1033,
"ShareByEmailEnabled": false,
"WebTemplateExtensionId": "00000000-0000-0000-0000-000000000000",
"Owner": "i:0#.f|membership|user@something.com",
"HubSiteId": "00000000-0000-0000-0000-000000000000"
}
}

 

References: 

  1. https://sharepoint.stackexchange.com/questions/259917/create-new-site-collection-with-rest-api
  2. https://simonagren.github.io/sites-sitedesign-rest/
  3. https://github.com/SharePoint/sp-dev-docs/issues/2148
Copper Contributor

Hi @Yu Chen@ronalg 

I am experiencing an issue when trying to use /_api/SPSiteManager/Create within Power Automate (Flow) to create a Sharepoint Online Modern Site with no 365 group.

I have used the example on this site to create the POST.

I am getting a '200' Status Code with the response below and can not work out what is going wrong.

 
{
  "d": {
    "Create": {
      "__metadata": {
        "type": "Microsoft.SharePoint.Portal.SPSiteCreationResponse"
      },
      "SiteId": "",
      "SiteStatus": 3,
      "SiteUrl": ""
    }
  }
}

I have tried the following end points:

https://tenant.sharepoint.com/_api/SPSiteManager/Create

https://tenant-admin.sharepoint.com/_api/SPSiteManager/Create

both return the same response. 

I have tried 2 separate user accounts and both return the same response.

 

Could anyone provide any other areas to check or any guidance?

 

Thanks is advance 

 
Copper Contributor

Hi @DannyIrving  I think you might have the site created with same name and deleted. Please check once and delete it from deleted sites also and then try again.

 

Thanks Hope this works.

Copper Contributor

@DannyIrving I'm having the same trouble.  Did you find a solution?

 

Thanks

 

d;)

Copper Contributor

Hi everyone, it worked perfectly for me using another template

 

pmsorli_1-1631198599797.png

I hope it helps you !!

Version history
Last update:
‎Apr 28 2020 12:37 PM
Updated by: