Grant-PnPHubSiteRights

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Grant-PnPHubSiteRights.md to change this file.

Required Permissions

  • SharePoint: Access to the SharePoint Tenant Administration site

Grant additional permissions to the permissions already in place to associate sites to Hub Sites for one or more specific users

Syntax

Grant-PnPHubSiteRights
     [-Identity] <HubSitePipeBind>
     -Principals <String[]>
     [-Connection <PnPConnection>]
     [<CommonParameters>]

Examples

EXAMPLE 1

Grant-PnPHubSiteRights -Identity "https://contoso.sharepoint.com/sites/hubsite" -Principals "myuser@mydomain.com","myotheruser@mydomain.com"

This example shows how to grant rights to myuser and myotheruser to associate their sites with the provided Hub Site

Parameters

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:PnPConnection
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Identity

Specify hub site url

Type:HubSitePipeBind
Aliases:HubSite
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Principals

Specify user(s) login name i.e user@company.com

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False