Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
az webapp identity
Manage web app's managed identity.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az webapp identity assign |
Assign managed identity to the web app. |
Core | GA |
| az webapp identity remove |
Disable web app's managed identity. |
Core | GA |
| az webapp identity show |
Display web app's managed identity. |
Core | GA |
az webapp identity assign
Assign managed identity to the web app.
az webapp identity assign [--acquire-policy-token]
[--change-reference]
[--identities]
[--ids]
[--name]
[--resource-group]
[--role]
[--scope]
[--slot]
[--subscription]
Examples
assign local identity and assign a reader role to the current resource group.
az webapp identity assign -g MyResourceGroup -n MyUniqueApp --role reader --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/MyResourceGroup
enable identity for the web app.
az webapp identity assign -g MyResourceGroup -n MyUniqueApp
assign local identity and a user assigned identity to a webapp.
az webapp identity assign -g MyResourceGroup -n MyUniqueApp --identities [system] myAssignedId
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Space-separated identities to assign. Use '[system]' to refer to the system assigned identity. Default: '[system]'.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Role name or id the managed identity will be assigned.
| Property | Value |
|---|---|
| Default value: | Contributor |
The scope the managed identity has access to.
The name of the slot. Default to the productions slot if not specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
az webapp identity remove
Disable web app's managed identity.
az webapp identity remove [--acquire-policy-token]
[--change-reference]
[--identities]
[--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
Examples
Disable web app's system managed identity
az webapp identity remove --name MyWebApp --resource-group MyResourceGroup
Disable web app's system managed identity and a user managed identity
az webapp identity remove --name MyWebApp --resource-group MyResourceGroup --identities [system] myAssignedId
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Space-separated identities to assign. Use '[system]' to refer to the system assigned identity. Default: '[system]'.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the slot. Default to the productions slot if not specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
az webapp identity show
Display web app's managed identity.
az webapp identity show [--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
Examples
display webapp's managed identity (autogenerated)
az webapp identity show --name MyWebapp --resource-group MyResourceGroup
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the slot. Default to the productions slot if not specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Feedback
Was this page helpful?
