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,manageorfullcontrol)-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 isfull.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns 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