az identity
Manage Azure user-assigned managed identities.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az identity create |
Create a user-assigned managed identity. |
Core | Preview |
| az identity delete |
Delete a user-assigned managed identity. |
Core | Preview |
| az identity federated-credential |
Manage federated identity credentials on a user-assigned managed identity. |
Core | Preview |
| az identity federated-credential create |
Create a federated identity credential on a user-assigned managed identity. |
Core | Preview |
| az identity federated-credential delete |
Delete a federated identity credential from a user-assigned managed identity. |
Core | Preview |
| az identity federated-credential list |
List the federated identity credentials on a user-assigned managed identity. |
Core | Preview |
| az identity federated-credential show |
Show a federated identity credential on a user-assigned managed identity. |
Core | Preview |
| az identity federated-credential update |
Update a federated identity credential on a user-assigned managed identity. |
Core | Preview |
| az identity list |
List user-assigned managed identities. |
Core | Preview |
| az identity show |
Show a user-assigned managed identity. |
Core | Preview |
| az identity update |
Update a user-assigned managed identity. |
Core | Preview |
az identity create
Create a user-assigned managed identity.
Create a user-assigned managed identity in the specified subscription and resource group.
az identity create --location
--name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--isolation-scope {None, Regional}]
[--resource-restriction]
[--subscription]
[--tags]
Examples
Create an identity
az identity create --name myIdentity --resource-group myResourceGroup --location eastus
Create an identity with regional assignment restrictions
az identity create --name myIdentity --resource-group myResourceGroup --location eastus --isolation-scope Regional
Create an identity with resource assignment restrictions
az identity create --name myIdentity --resource-group myResourceGroup --location eastus --resource-restriction '{"providers":["Microsoft.Compute"]}'
Required Parameters
The geo-location where the resource lives.
The name of the identity resource.
Name of resource group.
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.
The related change reference ID for this resource operation.
Enum to configure regional restrictions on identity assignment, as necessary.
| Property | Value |
|---|---|
| Accepted values: | None, Regional |
Restrictions on which resource providers this identity can be assigned to.
Name or ID of subscription.
Resource tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az identity delete
Delete a user-assigned managed identity.
Delete a user-assigned managed identity by name and resource group, or by one or more full Azure resource IDs.
az identity delete [--acquire-policy-token]
[--change-reference]
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Delete an identity by name
az identity delete --name myIdentity --resource-group myResourceGroup
Delete identities by resource ID
az identity delete --ids /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity
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.
The related change reference ID for this resource operation.
One or more resource IDs. Provide either --ids or other Resource Id arguments.
The name of the identity resource.
Name of resource group.
Name or ID of subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az identity list
List user-assigned managed identities.
List user-assigned managed identities in the current subscription or in a specific resource group.
az identity list [--resource-group]
[--subscription]
Examples
List identities in a resource group
az identity list --resource-group myResourceGroup
List identities in the current subscription
az identity list
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Name of resource group.
Name or ID of subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az identity show
Show a user-assigned managed identity.
Get a user-assigned managed identity by name and resource group, or by its full Azure resource ID.
az identity show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Show an identity by name
az identity show --name myIdentity --resource-group myResourceGroup
Show an identity by resource ID
az identity show --ids /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity
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. Provide either --ids or other Resource Id arguments.
The name of the identity resource.
Name of resource group.
Name or ID of subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az identity update
Update a user-assigned managed identity.
Update tags, identity isolation scope, resource assignment restrictions, or generic properties on a user-assigned managed identity.
az identity update [--acquire-policy-token]
[--add]
[--change-reference]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--isolation-scope {None, Regional}]
[--name]
[--remove]
[--resource-group]
[--resource-restriction]
[--set]
[--subscription]
[--tags]
Examples
Update an identity's isolation scope
az identity update --name myIdentity --resource-group myResourceGroup --isolation-scope None
Update an identity by resource ID
az identity update --ids /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity --tags env=prod
Update resource assignment restrictions
az identity update --name myIdentity --resource-group myResourceGroup --resource-restriction '{"providers":["Microsoft.Storage"]}' --isolation-scope Regional
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.
Add an object to a list of objects by specifying a path and key value pairs.
The related change reference ID for this resource operation.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
One or more resource IDs. Provide either --ids or other Resource Id arguments.
Enum to configure regional restrictions on identity assignment, as necessary.
| Property | Value |
|---|---|
| Accepted values: | None, Regional |
The name of the identity resource.
Remove a property or an element from a list.
Name of resource group.
Restrictions on which resource providers this identity can be assigned to.
Update an object by specifying a property path and value to set.
Name or ID of subscription.
Resource tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.