Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Azure CLI to generate managed identity for app service
## Create system-assigned managed identity
az webapp identity assign --name azureappservicename --resource-group myResourceGroup
## Output of above command is as below.
## {
## "principalId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
## "tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
## "type": "SystemAssigned"
## }
##
## principalId is required for setting access policy through CLI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment