Skip to content

Instantly share code, notes, and snippets.

@navicore
Last active November 6, 2019 11:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save navicore/e295af9894f933342dc195729eec91ba to your computer and use it in GitHub Desktop.
Save navicore/e295af9894f933342dc195729eec91ba to your computer and use it in GitHub Desktop.
az commands

az commands

get tenant id and subscription id

az account show -o json | jq ".tenantId, .id"

create an application

az ad app create --display-name myapp --identifier-uris https://onexent.com --homepage https://onextent.com --password SECRET

create service principal

az ad sp create --id <APPID>

grant permission

az role assignment create --role "Owner" --assignee <UUID of servicePrincipalNames entry>

get client id

az ad app list -o json | jq '.[] | select(.displayName | contains("myapp")) | .appId'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment