Usage
m365 spo hubsite connect
Description
Connect a hub site to a parent hub site.
Options
| Option |
Description |
--id [id] |
ID of the hub site. Specify either id, title or url but not multiple. |
--title [title] |
Title of the hub site. Specify either id, title or url but not multiple. |
--url [url] |
URL of the hub site. Specify either id, title or url but not multiple. |
---parentId [parentId] |
ID of the parent hub site. Specify either parentId, parentTitle or parentUrl. |
--parentTitle [parentTitle] |
Title of the parent hub site. Specify either parentId, parentTitle or parentUrl. |
--parentUrl [parentUrl] |
URL of the parent hub site. Specify either parentId, parentTitle or parentUrl. |
Examples
Connects a hub site to a parent hub site by URL.
m365 spo hubsite connect --url 'https://contoso.sharepoint.com/sites/HubSite' --parentUrl 'https://contoso.sharepoint.com/sites/ParentHubSite'
Connects a hub site to a parent hub site by ID.
m365 spo hubsite connect --parentId bd78e5e7-c1d3-4711-9151-c161f872572c --id 2020e407-b5d5-4228-95ff-05f783101281
Additional Info
We could use spo hubsite get command to get the ID of both the hubsite and the parent hubsite.
After that we should execute the following API request:
PATCH https://tenant.sharepoint.com/sites/project-x/_api/HubSites/GetById('<hubsite ID>')
If-Match: <etag value>
{
"ParentHubSiteId": <parent hubsite ID>
}
Blocking issue
This issue is blocked until this issue has been completed:
Usage
m365 spo hubsite connect
Description
Connect a hub site to a parent hub site.
Options
--id [id]id,titleorurlbut not multiple.--title [title]id,titleorurlbut not multiple.--url [url]id,titleorurlbut not multiple.---parentId [parentId]parentId,parentTitleorparentUrl.--parentTitle [parentTitle]parentId,parentTitleorparentUrl.--parentUrl [parentUrl]parentId,parentTitleorparentUrl.Examples
Connects a hub site to a parent hub site by URL.
Connects a hub site to a parent hub site by ID.
Additional Info
We could use
spo hubsite getcommand to get the ID of both the hubsite and the parent hubsite.After that we should execute the following API request:
Blocking issue
This issue is blocked until this issue has been completed:
spo hubsite connecttospo site hubsite connect#3877