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.
--disabledDisable site requests for the entire site. Specify either
disabled,ownerGroup, oremail.--ownerGroupSend access requests to the owner group. Specify either
disabled,ownerGroup, oremail.--email [email]Send access requests to a specific email. Specify either
disabled,ownerGroup, oremail.--message [message]Add a custom message to the access request page. Cannot be used with the
--disabledoption.
-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 isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Permissions
- Delegated
- Application
| Resource | Permissions |
|---|---|
| SharePoint | AllSites.FullControl |
| Resource | Permissions |
|---|---|
| SharePoint | Sites.FullControl.All |
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.