Grant-SPOHubSiteRights
Grants rights to users or mail-enabled security groups to associate their site with a hub site.
Syntax
Default (Default)
Grant-SPOHubSiteRights
[-Identity] <SpoHubSitePipeBind>
-Principals <String[]>
-Rights <SPOHubSiteUserRightsClient>
[<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
Applicable: SharePoint Online
URL of the hub site.
Parameter properties
Type: | Microsoft.Online.SharePoint.PowerShell.SpoHubSitePipeBind |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | HubSite |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Principals
Applicable: SharePoint Online
One or more principals to add permissions for.
Parameter properties
Type: | System.String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Rights
Applicable: SharePoint Online
Always set to the value Join. Any user or group with Join permissions can view and join the hub site.
Parameter properties
Type: | String |
Default value: | None |
Accepted values: | Join |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.