Skip to content

spo hubsite rights grant

Grants permissions to join the hub site for one or more principals

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 rights grant [options]

Options

Option Description
--help output usage information
-u, --url <url> The URL of the hub site to grant rights on
-p, --principals <principals> Comma-separated list of principals to grant join rights. Principals can be users or mail-enabled security groups in the form of alias or alias@<domain name>.com
-r, --rights <rights> Rights to grant to principals. Available values Join
-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 tenant admin site, using the spo login command.

Remarks

To grant permissions to join the hub site, you have to first log in to a tenant admin site using the spo login command, eg. spo login https://contoso-admin.sharepoint.com. If you are logged in to a different site and will try to grant permissions to join the hub site, you will get an error.

Examples

Grant user with alias PattiF permission to join sites to the hub site with URL https://contoso.sharepoint.com/sites/sales

spo hubsite rights grant --url https://contoso.sharepoint.com/sites/sales --principals PattiF --rights Join

Grant users with aliases PattiF and AdeleV permission to join sites to the hub site with URL https://contoso.sharepoint.com/sites/sales

spo hubsite rights grant --url https://contoso.sharepoint.com/sites/sales --principals PattiF,AdeleV --rights Join

Grant user with email PattiF@contoso.com permission to join sites to the hub site with URL https://contoso.sharepoint.com/sites/sales

spo hubsite rights grant --url https://contoso.sharepoint.com/sites/sales --principals PattiF@contoso.com --rights Join

More information