Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az containerapp identity

Commands to manage managed identities.

Commands

Name Description Type Status
az containerapp identity assign

Assign managed identity to a container app.

Core GA
az containerapp identity remove

Remove a managed identity from a container app.

Core GA
az containerapp identity show

Show managed identities of a container app.

Core GA

az containerapp identity assign

Assign managed identity to a container app.

Managed identities can be user-assigned or system-assigned.

az containerapp identity assign [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name]
 [--no-wait]
 [--resource-group]
 [--subscription]
 [--system-assigned]
 [--user-assigned]

Examples

Assign system identity.

az containerapp identity assign -n my-containerapp -g MyResourceGroup --system-assigned

Assign user identity.

az containerapp identity assign -n my-containerapp -g MyResourceGroup --user-assigned myUserIdentityName

Assign user identity (from a different resource group than the containerapp).

az containerapp identity assign -n my-containerapp -g MyResourceGroup --user-assigned myUserIdentityResourceId

Assign system and user identity.

az containerapp identity assign -n my-containerapp -g MyResourceGroup --system-assigned --user-assigned myUserIdentityResourceId

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

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 -n

The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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
--system-assigned

Boolean indicating whether to assign system-assigned identity.

Property Value
Default value: False
--user-assigned

Space-separated user identities.

az containerapp identity remove

Remove a managed identity from a container app.

az containerapp identity remove [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name]
 [--no-wait]
 [--resource-group]
 [--subscription]
 [--system-assigned]
 [--user-assigned]

Examples

Remove system identity.

az containerapp identity remove -n my-containerapp -g MyResourceGroup --system-assigned

Remove user identity.

az containerapp identity remove -n my-containerapp -g MyResourceGroup --user-assigned myUserIdentityName

Remove system and user identity (from a different resource group than the containerapp).

az containerapp identity remove -n my-containerapp -g MyResourceGroup --system-assigned --user-assigned myUserIdentityResourceId

Remove all user identities.

az containerapp identity remove -n my-containerapp -g MyResourceGroup --user-assigned

Remove system identity and all user identities.

az containerapp identity remove -n my-containerapp -g MyResourceGroup --system-assigned --user-assigned

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

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 -n

The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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
--system-assigned

Boolean indicating whether to assign system-assigned identity.

Property Value
Default value: False
--user-assigned

Space-separated user identities. If no user identities are specified, all user identities will be removed.

az containerapp identity show

Show managed identities of a container app.

az containerapp identity show [--ids]
 [--name]
 [--resource-group]
 [--subscription]

Examples

Show managed identities.

az containerapp identity show -n my-containerapp -g 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.

--ids

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 -n

The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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?