Levy
Scout

InternalServerError when creating modern site with /_api/SPSiteManager/create

Within a "Call HTTP Web Service Action", I try to create a team site which is not connected to a group.

The official documentation (Erstellen von modernen SharePoint-Websites mithilfe von REST | Microsoft Docs) that misses a lot, is not a good helper here.

What I did:

Adding the request headers to a dictonary:

SetRequestHeader.png

 

Assign the api url to a variable:

SetUrl.png

 

Assign the full url to a variable:

endpoint.png

(I also tried with the root url instead of current site url)

 

Assigning the request to a dictionary:

SetReq1.png

SetReq2.png

 

SetReq3.png My list item field "Serverrelative URL" contains for example "/sales"

And then the action to call the api:

Callhttp.png

 

The response status code is 0 and the message which will be added to the Workflow-History is InternalServerError. The Response Content is empty.

 

What am I missing?

 

 

Labels: (1)
0 Kudos
Reply
1 Reply
Levy
Scout

Re: InternalServerError when creating modern site with /_api/SPSiteManager/create

What I did so far:

 

changed the request headers to:

odata-version: 4.0
Accept: application/json;odata.metadata=none
X-RequestDigest: digestToken

I determined the request digest by calling the contextInfo in a previous HTTP Web Service Call and assigned it to a variable which I used here.

From the response of the /api/contextInfo I get 200 OK and got a valid token.

 

I changed the WebTemplateExtensionId to our custom SiteDesignId and assigned 00000000-0000-0000-0000-000000000000 to SiteDesignId as described in the documentation.

 

Now my request to create a site seems to be OK but I get 403 Forbidden now.

The Workflow runs under the context of the user (without elevated permissions).

During the execution of this peace, I am logged in with a SharePoint-Administrator role and Global Admin role (Azure AD).

 

What else could causing "Forbidden"?

 

then

 

0 Kudos
Reply