Skip to main content

spo hubsite get

Gets information about the specified hub site

Usage

m365 spo hubsite get [options]

Options

-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.

--includeAssociatedSites

Include the associated sites in the result (only in JSON output)

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Examples

Get information about the hub site with specific ID.

m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a

Get information about the hub site with specific title.

m365 spo hubsite get --title 'My Hub Site'

Get information about the hub site with specific URL.

m365 spo hubsite get --url 'https://contoso.sharepoint.com/sites/HubSite'

Get information about the hub site with specific ID, including its associated sites. Associated site info is only shown in JSON output.

m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a --includeAssociatedSites --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"
}

includeAssociatedSites response

When we make use of the option includeAssociatedSites the response will differ. This command can only be executed using --output json or an error will be thrown.

{
"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",
"SiteId": "1e1232eb-1a78-4726-8bb9-56af3640228d",
"SiteUrl": "https://contoso.sharepoint.com/sites/about-us"
}
]
}

More information

CTRL + M