Commands › SharePoint Online

Grant-SPOHubSiteRights

SharePoint Online Microsoft.Online.SharePoint.PowerShell Grant-*

Grants rights to users or mail-enabled security groups to associate their site with a hub site.

Quick start script

# Grant-SPOHubSiteRights — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Grant-SPOHubSiteRights -Identity <SpoHubSitePipeBind> -Principals <String[]> -Rights <String> | Format-List

# 3. Export for evidence / drift tracking
Grant-SPOHubSiteRights | Export-Clixml .\SPOHubSiteRights-$(Get-Date -Format yyyyMMdd).xml

Syntax

Grant-SPOHubSiteRights [-Identity] <SpoHubSitePipeBind> -Principals <String[]>
 -Rights <SPOHubSiteUserRightsClient> [<CommonParameters>]

Parameters (3)

ParameterTypeRequiredWhat it controls
-Identity SpoHubSitePipeBind yes URL of the hub site.
-Principals String[] yes One or more principals to add permissions for.
-Rights String yes Always set to the value **Join**. Any user or group with **Join** permissions can view and join the hub site.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.