Skip to content

Instantly share code, notes, and snippets.

@garrytrinder
Created July 16, 2020 20:27
Show Gist options
  • Save garrytrinder/808a8f9ca7d1e3d9f2bad3b8c80cfc14 to your computer and use it in GitHub Desktop.
Save garrytrinder/808a8f9ca7d1e3d9f2bad3b8c80cfc14 to your computer and use it in GitHub Desktop.
Creates Azure AD App Registration, assigns AllSites.FullControl and AllSites.Read SharePoint permissions and grants admin consent
appId=`az ad app create --display-name acms --password abcde12345 --credential-description master --required-resource-accesses @manifest.json --query "appId" --output tsv`
az ad app permission admin-consent --id ${appId}
[
{
"resourceAppId": "00000003-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "56680e0d-d2a3-4ae1-80d8-3c4f2100e3d0",
"type": "Scope"
},
{
"id": "4e0d77b0-96ba-4398-af14-3baa780278f4",
"type": "Scope"
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment