Skip to content

spo site apppermission set

Updates a specific application permission for a site

Usage

m365 spo site apppermission set [options]

Options

-u, --siteUrl <siteUrl>
URL of the site collection where the permission to retrieve is located
-i, --id [id]
ID of the permission to update. Specify id, appId or appDisplayName
--appId [appId]
Client ID of the Azure AD app for which to update permissions. Specify id, appId or appDisplayName
-n, --appDisplayName [appDisplayName]
Display name of the Azure AD app for which to update permissions. Specify id, appId or appDisplayName
-p, --permission <permission>
Permission to site (read, write, manage or fullcontrol)
-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 full.
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Examples

Updates a specific application permission to read for the https://contoso.sharepoint.com/sites/project-x site collection with permission id aTowaS50fG1zLnNwLmV4dHw4OWVhNWM5NC03NzM2LTRlMjUtOTVhZC0zZmE5NWY2MmI2NmVAZGUzNDhiYzctMWFlYi00NDA2LThjYjMtOTdkYjAyMWNhZGI0

m365 spo site apppermission set --siteUrl https://contoso.sharepoint.com/sites/project-x --id aTowaS50fG1zLnNwLmV4dHw4OWVhNWM5NC03NzM2LTRlMjUtOTVhZC0zZmE5NWY2MmI2NmVAZGUzNDhiYzctMWFlYi00NDA2LThjYjMtOTdkYjAyMWNhZGI0 --permission read

Updates a specific application permission to read for the https://contoso.sharepoint.com/sites/project-x site collection with an application called Foo

m365 spo site apppermission set --siteUrl https://contoso.sharepoint.com/sites/project-x --appDisplayName Foo --permission read

Updates a specific application permission to read for the https://contoso.sharepoint.com/sites/project-x site collection with an application id 89ea5c94-7736-4e25-95ad-3fa95f62b66e

m365 spo site apppermission set --siteUrl https://contoso.sharepoint.com/sites/project-x --appId 89ea5c94-7736-4e25-95ad-3fa95f62b66e --permission read