Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .devproxy/api-specs/sharepoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,54 @@ paths:
responses:
200:
description: OK
/_api/web:
patch:
requestBody:
required: true
content:
application/json:
example:
RequestAccessEmail: "[email protected]"
security:
- delegated:
- AllSites.FullControl
- application:
- Sites.FullControl.All
responses:
200:
description: OK
/_api/web/SetUseAccessRequestDefaultAndUpdate:
post:
requestBody:
required: true
content:
application/json:
example:
useAccessRequestDefault: true
security:
- delegated:
- AllSites.FullControl
- application:
- Sites.FullControl.All
responses:
200:
description: OK
/_api/web/SetAccessRequestSiteDescriptionAndUpdate:
post:
requestBody:
required: true
content:
application/json:
example:
description: "Motivate why you need access."
security:
- delegated:
- AllSites.FullControl
- application:
- Sites.FullControl.All
responses:
200:
description: OK
x-ms-generated-by:
toolName: Dev Proxy
toolVersion: 0.25.0
77 changes: 77 additions & 0 deletions docs/docs/cmd/spo/site/site-accessrequest-setting-set.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import Global from '/docs/cmd/_global.mdx';

# spo site accessrequest setting set

Update access requests for a specific site

## Usage

```sh
m365 spo site accessrequest setting set [options]
```

## Options

```md definition-list
`-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.
```

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|------------|----------------------|
| SharePoint | AllSites.FullControl |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|------------|-----------------------|
| SharePoint | Sites.FullControl.All |

</TabItem>
</Tabs>

## Examples

Disable access requests for a specific site.

```sh
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.

```sh
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.

```sh
m365 spo site accessrequest setting set --siteUrl https://contoso.sharepoint.com/sites/Management --email [email protected] --message "Motivate why you need access."
```

## Response

The command won't return a response on success.


Comment on lines +78 to +79
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove the trailing empty lines at the end of the file to maintain consistency with project formatting standards.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +78 to +79
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove the trailing blank lines at the end of the file.

Suggested change

Copilot uses AI. Check for mistakes.
5 changes: 5 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3689,6 +3689,11 @@ const sidebars: SidebarsConfig = {
label: 'site unarchive',
id: 'cmd/spo/site/site-unarchive'
},
{
type: 'doc',
label: 'site accessrequest setting set',
id: 'cmd/spo/site/site-accessrequest-setting-set'
},
{
type: 'doc',
label: 'site admin add',
Expand Down
1 change: 1 addition & 0 deletions src/m365/spo/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export default {
SERVICEPRINCIPAL_PERMISSIONREQUEST_LIST: `${prefix} serviceprincipal permissionrequest list`,
SERVICEPRINCIPAL_SET: `${prefix} serviceprincipal set`,
SET: `${prefix} set`,
SITE_ACCESSREQUEST_SETTING_SET: `${prefix} site accessrequest setting set`,
SITE_ADD: `${prefix} site add`,
SITE_ADMIN_ADD: `${prefix} site admin add`,
SITE_ADMIN_LIST: `${prefix} site admin list`,
Expand Down
Loading
Loading