Skip to content

Latest commit

 

History

History
210 lines (166 loc) · 5.67 KB

File metadata and controls

210 lines (166 loc) · 5.67 KB

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

spo hubsite list

Lists hub sites in the current tenant

Usage

m365 spo hubsite list [options]

Options

`--withAssociatedSites`
: Include the associated sites in the result (only in JSON output).

Remarks

When using the text or csv output type, the command lists only the values of the ID, SiteUrl and Title properties of the hub site. With the output type as JSON, all available properties are included in the command output.

Examples

List hub sites in the current tenant

m365 spo hubsite list

List hub sites, including their associated sites, in the current tenant. Associated site info is only shown in JSON output.

m365 spo hubsite list --withAssociatedSites --output json

Response

Standard response

[
  {
    "Description": "Intranet Hub Site",
    "EnablePermissionsSync": false,
    "EnforcedECTs": null,
    "EnforcedECTsVersion": 0,
    "HideNameInNavigation": false,
    "ID": "af80c11f-0138-4d72-bb37-514542c3aabb",
    "LogoUrl": "https://contoso.sharepoint.com/sites/intra/SiteAssets/work.png",
    "ParentHubSiteId": "ec78f3aa-5a74-4f16-be49-3396df045f34",
    "PermissionsSyncTag": 0,
    "RequiresJoinApproval": false,
    "SiteDesignId": "184644fb-90ed-4841-a7ad-6930cf819060",
    "SiteId": "af80c11f-0138-4d72-bb37-514542c3aabb",
    "SiteUrl": "https://contoso.sharepoint.com/sites/intra",
    "Targets": null,
    "TenantInstanceId": "5d128b52-7228-46b5-8765-5b338476054d",
    "Title": "Intranet"
  }
]
ID                                    SiteUrl                                     Title
------------------------------------  ------------------------------------------  --------
af80c11f-0138-4d72-bb37-514542c3aabb  https://contoso.sharepoint.com/sites/intra  Intranet
ID,SiteUrl,Title
af80c11f-0138-4d72-bb37-514542c3aabb,https://contoso.sharepoint.com/sites/intra,Intranet
# spo hubsite list

Date: 2/20/2023

## Intranet (af80c11f-0138-4d72-bb37-514542c3aabb)

Property | Value
---------|-------
Description | Intranet Hub Site
EnablePermissionsSync | false
EnforcedECTs | null
EnforcedECTsVersion | 0
HideNameInNavigation | false
ID | af80c11f-0138-4d72-bb37-514542c3aabb
LogoUrl | https://contoso.sharepoint.com/sites/intra/SiteAssets/work.png
ParentHubSiteId | ec78f3aa-5a74-4f16-be49-3396df045f34
PermissionsSyncTag | 0
RequiresJoinApproval | false
SiteDesignId | 184644fb-90ed-4841-a7ad-6930cf819060
SiteId | af80c11f-0138-4d72-bb37-514542c3aabb
SiteUrl | https://contoso.sharepoint.com/sites/intra
Targets | null
TenantInstanceId | 5d128b52-7228-46b5-8765-5b338476054d
Title | Intranet

withAssociatedSites response

When we make use of the option withAssociatedSites the response will differ.

[
  {
    "Description": "Intranet Hub Site",
    "EnablePermissionsSync": false,
    "EnforcedECTs": null,
    "EnforcedECTsVersion": 0,
    "HideNameInNavigation": false,
    "ID": "af80c11f-0138-4d72-bb37-514542c3aabb",
    "LogoUrl": "https://contoso.sharepoint.com/sites/intra/SiteAssets/work.png",
    "ParentHubSiteId": "ec78f3aa-5a74-4f16-be49-3396df045f34",
    "PermissionsSyncTag": 0,
    "RequiresJoinApproval": false,
    "SiteDesignId": "184644fb-90ed-4841-a7ad-6930cf819060",
    "SiteId": "af80c11f-0138-4d72-bb37-514542c3aabb",
    "SiteUrl": "https://contoso.sharepoint.com/sites/intra",
    "Targets": null,
    "TenantInstanceId": "5d128b52-7228-46b5-8765-5b338476054d",
    "Title": "Intranet",
    "AssociatedSites": [
      {
        "Title": "About Us",
        "SiteUrl": "https://contoso.sharepoint.com/sites/about-us"
      }
    ]
  }
]
ID                                    SiteUrl                                     Title
------------------------------------  ------------------------------------------  --------
af80c11f-0138-4d72-bb37-514542c3aabb  https://contoso.sharepoint.com/sites/intra  Intranet
ID,SiteUrl,Title
af80c11f-0138-4d72-bb37-514542c3aabb,https://contoso.sharepoint.com/sites/intra,Intranet
# spo hubsite list --withAssociatedSites "true"

Date: 2/20/2023

## Intranet (af80c11f-0138-4d72-bb37-514542c3aabb)

Property | Value
---------|-------
Description | Intranet Hub Site
EnablePermissionsSync | false
EnforcedECTs | null
EnforcedECTsVersion | 0
HideNameInNavigation | false
ID | af80c11f-0138-4d72-bb37-514542c3aabb
LogoUrl | https://contoso.sharepoint.com/sites/intra/SiteAssets/work.png
ParentHubSiteId | ec78f3aa-5a74-4f16-be49-3396df045f34
PermissionsSyncTag | 0
RequiresJoinApproval | false
SiteDesignId | 184644fb-90ed-4841-a7ad-6930cf819060
SiteId | af80c11f-0138-4d72-bb37-514542c3aabb
SiteUrl | https://contoso.sharepoint.com/sites/intra
Targets | null
TenantInstanceId | 5d128b52-7228-46b5-8765-5b338476054d
Title | Intranet

More information