1

Regarding this article its possible to create a modern team site via REST. I now got a valid token via Client Credential Flow and try to execute the following REST operation:

Method: POST
Url: https://<my-site>.sharepoint.com/_api/SPSiteManager/create
Headers:
Accept: application/json;odata.metadata=none
Authorization: Bearer <token>
odata-version: 4.0

Body:
{
                          "Title": "Commun",
                          "Url":"https://<site>.sharepoint.com/sites/testpage",
                          "Lcid": 1033,
                          "ShareByEmailEnabled":false,
                          "Classification":"Low Business Impact",
                          "Description":"Description",
                          "WebTemplate":"STS#3",
                          "SiteDesignId":"f6cc5403-0d63-442e-96c0-285923709ffc",
                          "Owner":"myself@<myurl>.com"
}

Did you try this also? I always get a status code "Bad Request" with:

{
    "error": {
        "code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
        "message": "The parameter Title does not exist in method Create."
    }
}
David Mason
  • 329
  • 3
  • 14

0 Answers0