import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# spo site hubsite disconnect

Disconnects the specified site collection from its hub site

## Usage

```sh
m365 spo site hubsite disconnect [options]
```

## Options

```md definition-list
`-u, --siteUrl <siteUrl>`
: URL of the site collection to disconnect from its hub site.

`--asAdmin`
: Disconnect the site from a hub site as SharePoint admin.

`-f, --force`
: Don't prompt for confirmation.
```

<Global />

## Permissions

<Tabs>
  <TabItem value="Delegated">

  | Resource   | Permissions          |
  |------------|----------------------|
  | SharePoint | AllSites.FullControl |

  </TabItem>
  <TabItem value="Application">

  | Resource   | Permissions           |
  |------------|-----------------------|
  | SharePoint | Sites.FullControl.All |

  </TabItem>
</Tabs>

## Examples

Disconnect a specific site collection from its hub site. Will prompt for confirmation before disconnecting from the hub site.

```sh
m365 spo site hubsite disconnect --siteUrl https://contoso.sharepoint.com/sites/sales
```

Disconnect a specific site collection from its hub site as SharePoint admin.

```sh
m365 spo site hubsite disconnect --siteUrl https://contoso.sharepoint.com/sites/sales --asAdmin
```

Disconnect a specific site collection from its hub site without prompting for confirmation.

```sh
m365 spo site hubsite disconnect --siteUrl https://contoso.sharepoint.com/sites/sales --force
```

## Response

The command won't return a response on success.

## More information

- SharePoint hub sites new in Microsoft 365: [https://techcommunity.microsoft.com/t5/SharePoint-Blog/SharePoint-hub-sites-new-in-Office-365/ba-p/109547](https://techcommunity.microsoft.com/t5/SharePoint-Blog/SharePoint-hub-sites-new-in-Office-365/ba-p/109547)
