Skip to content

spo hubsite data get

Get hub site data for the specified site

Attention

This command is based on a SharePoint API that is currently in preview and is subject to change once the API reached general availability.

Usage

spo hubsite data get [options]

Options

Option Description
--help output usage information
-u, --webUrl <webUrl> URL of the site for which to retrieve hub site data
-f, --forceRefresh Set, to refresh the server cache with the latest updates
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Important

Before using this command, log in to a SharePoint Online site, using the spo login command.

Remarks

To get hub site data for a site, you have to first log in to a SharePoint site using the spo login command, eg. spo login https://contoso.sharepoint.com.

By default, the hub site data is returned from the server's cache. To refresh the data with the latest updates, use the -f, --forceRefresh option. Use this option, if you just made changes and need to see them right away.

If the specified site is not connected to a hub site site and is not a hub site itself, no data will be retrieved.

Examples

Get information about the hub site data for a site with URL https://contoso.sharepoint.com/sites/project-x

spo hubsite data get --webUrl https://contoso.sharepoint.com/sites/project-x

More information