Grant-SPOHubSiteRights

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

Syntax

Grant-SPOHubSiteRights
     [-Identity] <SpoHubSitePipeBind>
     -Principals    <string[]>
     -Rights {Join} 
     [<CommonParameters>]

Description

Applies permissions to a set of users or mail-enabled security groups. Use this cmdlet to scope visibility of who can associate their site with the hub site when using the SharePoint user interface. Hub sites are public by default. Once you set permissions, only those groups or users you specified can associate their site with the hub site.

To view which users or groups have permissions to a site, use the Get-SPOHubSite cmdlet.

Examples

Example 1

Grant-SPOHubSiteRights https://contoso.sharepoint.com/sites/Marketing
-Principals nestorw@contoso.onmicrosoft.com
-Rights Join

This example shows how to grant rights to Nestor (a user at the fictional Contoso site) to associate his sites with the marketing hub site.

Parameters

-Identity

URL of the hub site.

Type:SpoSitePipeBind
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

-Principals

One or more principals to add permissions for.

Type:String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

-Rights

Always set to the value Join. Any user or group with Join permissions can view and join the hub site.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online