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
orurl
but not multiple. -t, --title [title]
- Title of the hub site. Specify either
id
,title
orurl
but not multiple. -u, --url [url]
- URL of the hub site. Specify either
id
,title
orurl
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 isfull
. --query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text,csv,md
. Defaultjson
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Examples¶
Get information about the hub site with ID 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a
m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a
Get information about the hub site with Title My Hub Site
m365 spo hubsite get --title 'My Hub Site'
Get information about the hub site with URL https://contoso.sharepoint.com/sites/HubSite
m365 spo hubsite get --url 'https://contoso.sharepoint.com/sites/HubSite'
Get information about the hub site with ID 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a, 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
Get information about the hub site with Title My Hub Site
m365 spo hubsite get --title "My Hub Site"
Get information about the hub site with URL https://contoso.sharepoint.com/sites/HubSite
m365 spo hubsite get --url "https://contoso.sharepoint.com/sites/HubSite"
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"
}
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
Description,EnablePermissionsSync,EnforcedECTs,EnforcedECTsVersion,HideNameInNavigation,ID,LogoUrl,ParentHubSiteId,PermissionsSyncTag,RequiresJoinApproval,SiteDesignId,SiteId,SiteUrl,Targets,TenantInstanceId,Title
Intranet Hub Site,false,,0,false,af80c11f-0138-4d72-bb37-514542c3aabb,https://contoso.sharepoint.com/sites/intra/SiteAssets/work.png,ec78f3aa-5a74-4f16-be49-3396df045f34,0,false,184644fb-90ed-4841-a7ad-6930cf819060,af80c11f-0138-4d72-bb37-514542c3aabb,https://contoso.sharepoint.com/sites/intra,,5d128b52-7228-46b5-8765-5b338476054d,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¶
- SharePoint hub sites new in Microsoft 365: https://techcommunity.microsoft.com/t5/SharePoint-Blog/SharePoint-hub-sites-new-in-Office-365/ba-p/109547