Skip to 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, read,write). If multiple permissions have to be granted, they have to be comma separated ex. read,write
-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
output usage information
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text. Default text
--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