Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creates the service principal for PnP PowerShell.
$PnPPowerShellAppId = "31359c7f-bd7e-475c-86db-fdb8c937548e"
az ad sp create --id $PnPPowerShellAppId
#The guid 00000003-0000-0000-c000-000000000000 corresponds to Microsoft Graph
az ad app permission grant --id $PnPPowerShellAppId --api 00000003-0000-0000-c000-000000000000 --scope User.Read.All,Group.ReadWrite.All
#The guid 00000003-0000-0ff1-ce00-000000000000 corresponds to SPO
az ad app permission grant --id $PnPPowerShellAppId --api 00000003-0000-0ff1-ce00-000000000000 --scope User.Read.All,Sites.FullControl.All
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment