Does Grant-PnPAzureADAppSitePermission require Global Admin? #3830
Replies: 3 comments
-
What cmd do you use to set up your connection and grant permissions? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Yes here are the steps:
`##Connect to PNP Admin with SPO Admin Credentials $HashArguments = @{
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I am trying to understand the least privilege assignment needed to run this cmd. Documentation states the following:
https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins-modernize/understanding-rsc-for-msgraph-and-sharepoint-online
Once the Sites.Selected application permission is assigned and granted, the application still can't access any target site collection. In order to be able to access any target site, you'll need a tenant global admin or an application with Sites.FullControl.All application permission to grant explicit permissions for the selected target sites.
However this seems counter-intuitive. Sites.FullControl.All seems less privilege compared to Global Admin. Why does the command require only SPO Rights when running under an application context versus Global Admin rights when running under a user context? In fact, when I run the command using an account that is only SharePoint Online Service Admin AND site collection admin of the target site, it runs successfully.
Is it fair to say this command does not require Global Admin but rather can be run with just SPO Admin rights?
Beta Was this translation helpful? Give feedback.
All reactions