Skip to main content

spo site accessrequest setting set

Update access requests for a specific site

Usage

m365 spo site accessrequest setting set [options]

Options

-u, --siteUrl <siteUrl>

URL of the site collection.

--disabled

Disable site requests for the entire site. Specify either disabled, ownerGroup, or email.

--ownerGroup

Send access requests to the owner group. Specify either disabled, ownerGroup, or email.

--email [email]

Send access requests to a specific email. Specify either disabled, ownerGroup, or email.

--message [message]

Add a custom message to the access request page. Cannot be used with the --disabled option.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, permissions, 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.

Permissions

ResourcePermissions
SharePointAllSites.FullControl

Examples

Disable access requests for a specific site.

m365 spo site accessrequest setting set --siteUrl https://contoso.sharepoint.com/sites/Management --disabled

Send all access requests to the owner group of a specific site.

m365 spo site accessrequest setting set --siteUrl https://contoso.sharepoint.com/sites/Management --ownerGroup

Send all access requests to a specific email address and set a custom message.

m365 spo site accessrequest setting set --siteUrl https://contoso.sharepoint.com/sites/Management --email john.doe@contoso.com --message "Motivate why you need access."

Response

The command won't return a response on success.