I am trying to send an HTTP request towards the CreateSiteScript endpoint (/_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.CreateSiteScript(Title=@title)?@title='PSPMScript')
Headers:
{
"Cache-Control": "no-store, no-cache",
"Pragma": "no-cache",
"Set-Cookie": "ARRAffinity=41d3c965c9e2315c0c1a022a787866a0158b3dd7de79015a8b3a0517db60e823;Path=/;HttpOnly;Secure;Domain=sharepointonline-ukw.azconn-ukw-001.p.azurewebsites.net,ARRAffinitySameSite=41d3c965c9e2315c0c1a022a787866a0158b3dd7de79015a8b3a0517db60e823;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-ukw.azconn-ukw-001.p.azurewebsites.net",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "d50ee3a0-c04e-7000-5c8f-6c03a60d18ec",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"x-ms-apihub-obo": "false",
"Date": "Wed, 11 Oct 2023 12:40:13 GMT",
"Content-Length": "337",
"Content-Type": "application/json",
"Expires": "-1"
Output:
{
"status": 400,
"message": "Unexpected response from the service\r\nclientRequestId: deba1658-7169-4504-8043-3ffe7f7b2188\r\nserviceRequestId: d50ee3a0-c04e-7000-5c8f-6c03a60d18ec",
"error": {
"message": "Unexpected response from the service"
},
"source": "sharepointonline-ukw.azconn-ukw-001.p.azurewebsites.net"
}
The request body I am sending is quite long though, thus I am not pasting it here. Anyone with any suggestions?