Skip to main content

spo hubsite rights grant

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

Usage

m365 spo hubsite rights grant [options]

Options

-u, --hubSiteUrl <hubSiteUrl>

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.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

info

To use this command you must be a Global or SharePoint administrator.

Examples

Grant user with specific alias, permission to join sites to the hub site with specific URL.

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

Grant users with specific aliases, permission to join sites to the hub site with specific URL.

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

Grant user with specific email, permission to join sites to the hub site with specific URL.

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

Response

The command won't return a response on success.

More information

CTRL + M