Skip to main content

spo site apppermission add

Adds a specific application permissions to the site

Usage​

m365 spo site apppermission add [options]

Options​

-u, --siteUrl <siteUrl>

URL of the site collection to add the permission

-p, --permission <permission>

Permission to site (read, write, manage or fullcontrol)

-i, --appId [appId]

Client ID of the Azure AD app for which to grant permissions

-n, --appDisplayName [appDisplayName]

Display name of the Azure AD app for which to grant permissions

-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, md. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks​

To set permissions, specify at minimum either appId or addDisplayName. For best performance specify both values to avoid extra lookup.

Example​

Grants the specified app the read permission to site https://contoso.sharepoint.com/sites/project-x

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