Edit: You cancan cannot use the JoinHubSite method in a Send an HTTP requestfor this.
You can use the GetById to SharePoint actionupdate the settings of the newly create hub site. One of the properties is the ParentHubSiteId, this is the one which you can update.
Below are the docs of this REST API method:
https://learn.microsoft.com/en-us/sharepoint/dev/features/hub-site/rest-joinhubsite-method#http-requesthttps://learn.microsoft.com/en-us/sharepoint/dev/features/hub-site/rest-getbyid-method
Make sure you use the address of the newly created site in the Site Address field and the id of the Hubsite in theIn an example this would look like.
URI
_api/siteHubSites/JoinHubSiteGetById(hubSiteId'@{outputs('Send_an_HTTP_request_to_SharePoint_-_RegisterHubSite')?['body']['ID']}')
If that still does not work can you please share a screenshot of your error and/or current flow setup?Headers
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-HTTP-Method": "MERGE",
"If-Match": "*"
}
Body
{
"__metadata": { "type": "SP.HubSite" },
"Title":"New Hub Site Title",
"Description":"",
"LogoUrl": "",
"ParentHubSiteId":"@{variables('HubSiteId')}"
}
