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

Preview

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

--location -l

The geo-location where the resource lives.

--name -resource-name -n

The name of the identity resource.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

--change-reference

The related change reference ID for this resource operation.

--isolation-scope

Enum to configure regional restrictions on identity assignment, as necessary.

Property Value
Accepted values: None, Regional
--resource-restriction

Restrictions on which resource providers this identity can be assigned to.

--subscription

Name or ID of subscription.

--tags

Resource tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.

az identity delete

Preview

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

--change-reference

The related change reference ID for this resource operation.

--ids

One or more resource IDs. Provide either --ids or other Resource Id arguments.

--name -resource-name -n

The name of the identity resource.

--resource-group -g

Name of resource group.

--subscription

Name or ID of subscription.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.

az identity list

Preview

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.

--resource-group -g

Name of resource group.

--subscription

Name or ID of subscription.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.

az identity show

Preview

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.

--ids

One or more resource IDs. Provide either --ids or other Resource Id arguments.

--name -resource-name -n

The name of the identity resource.

--resource-group -g

Name of resource group.

--subscription

Name or ID of subscription.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.

az identity update

Preview

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

--add

Add an object to a list of objects by specifying a path and key value pairs.

--change-reference

The related change reference ID for this resource operation.

--force-string

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

One or more resource IDs. Provide either --ids or other Resource Id arguments.

--isolation-scope

Enum to configure regional restrictions on identity assignment, as necessary.

Property Value
Accepted values: None, Regional
--name -resource-name -n

The name of the identity resource.

--remove

Remove a property or an element from a list.

--resource-group -g

Name of resource group.

--resource-restriction

Restrictions on which resource providers this identity can be assigned to.

--set

Update an object by specifying a property path and value to set.

--subscription

Name or ID of subscription.

--tags

Resource tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.