How to create SharePoint site collection for classic template such as 'COMMUNITY#0' using Rest API
-
08-02-2021 - |
Domanda
I am looking to create classic site collection using Rest API. I able to create modern site such as communication using below API https://myowntestdomain.sharepoint.com/_api/SPSiteManager/create But not able to create classic site collection such as 'Community Site' using Rest API Thanks in advance
Soluzione
As far as I know,there is not a rest api can create a classic site collection.
You could use pnppowershell to create a classic site collection.
$username = "amos@contoso.onmicrosoft.com"
$password = "password"
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
Connect-SPOService -Url https://contoso-admin.sharepoint.com -Credential $cred
New-PnPTenantSite -Title team -Url /sites/team -Owner amos@contoso.onmicrosoft.com -Template STS#0 -TimeZone 4
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange