Question

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

Était-ce utile?

La solution

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

https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/new-pnptenantsite?view=sharepoint-ps

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top