Usage
m365 spo hubsite disconnect
Description
Disconnects the specified site collection from its parent hub site.
Options
| Option |
Description |
-i, --id [id] |
ID of the hub site. Specify either id, title or url but not multiple. |
-t, --title [title] |
Title of the hub site. Specify either id, title or url but not multiple. |
-u, --url [url] |
URL of the hub site. Specify either id, title or url but not multiple. |
--confirm |
Don't prompt for confirmation. |
Examples
Disconnects hub site from its parent by ID
m365 spo hubsite disconnect --idbd78e5e7-c1d3-4711-9151-c161f872572c
Disconnects hub site from its parent by URL
m365 spo hubsite disconnect --url"https://contoso.sharepoint.com/sites/HubSite"
Additional Info
We could use the spo hubsite get command to get the ID of the 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": "00000000-0000-0000-0000-000000000000"
}
Blocking issue
This issue is blocked until this issue has been completed:
Usage
m365 spo hubsite disconnect
Description
Disconnects the specified site collection from its parent hub site.
Options
-i, --id [id]id,titleorurlbut not multiple.-t, --title [title]id,titleorurlbut not multiple.-u, --url [url]id,titleorurlbut not multiple.--confirmExamples
Disconnects hub site from its parent by ID
Disconnects hub site from its parent by URL
m365 spo hubsite disconnect --url"https://contoso.sharepoint.com/sites/HubSite"Additional Info
We could use the
spo hubsite getcommand to get the ID of the hubsite.After that we should execute the following API request:
Blocking issue
This issue is blocked until this issue has been completed:
spo hubsite disconnecttospo site hubsite disconnect#3878