az identity federated-credential

Manage federated identity credentials on a user-assigned managed identity.

Commands

Name Description Type Status
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 federated-credential create

Preview

Create a federated identity credential on a user-assigned managed identity.

Create a federated identity credential that trusts an external OIDC issuer, so a workload presenting a matching token can exchange it for a Microsoft Entra access token on behalf of the managed identity. Specify either --subject or the claims-matching-expression pair, but not both.

az identity federated-credential create --identity-name
                                        --name
                                        --resource-group
                                        [--acquire-policy-token]
                                        [--audiences]
                                        [--change-reference]
                                        [--claims-matching-expression-value]
                                        [--claims-matching-expression-version]
                                        [--issuer]
                                        [--subject]
                                        [--subscription]

Examples

Create a federated credential using a subject

az identity federated-credential create --identity-name myIdentity --resource-group myResourceGroup --name myFederatedCredential --issuer https://kubernetes-oauth.azure.com --subject system:serviceaccount:ns:svcaccount --audiences api://AzureADTokenExchange

Required Parameters

--identity-name

The name of the identity resource.

--name -n

The name of the federated identity credential 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.

--audiences

The list of audiences that can appear in the issued token.

--change-reference

The related change reference ID for this resource operation.

--claims-matching-expression-value -cme-value

The wildcard-based expression for matching incoming claims. Cannot be used with --subject.

--claims-matching-expression-version -cme-version

Specifies the version of the claims matching expression used in the expression.

--issuer

The URL of the issuer to be trusted.

--subject

The identifier of the external software workload. Cannot be used with --claims-matching-expression-value.

--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 federated-credential delete

Preview

Delete a federated identity credential from a user-assigned managed identity.

az identity federated-credential delete --identity-name
                                        --name
                                        --resource-group
                                        [--acquire-policy-token]
                                        [--change-reference]
                                        [--subscription]

Examples

Delete a federated credential by name

az identity federated-credential delete --identity-name myIdentity --resource-group myResourceGroup --name myFederatedCredential

Required Parameters

--identity-name

The name of the identity resource.

--name -n

The name of the federated identity credential 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.

--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 federated-credential list

Preview

List the federated identity credentials on a user-assigned managed identity.

List all federated identity credentials configured on a user-assigned managed identity.

az identity federated-credential list --identity-name
                                      --resource-group
                                      [--skiptoken]
                                      [--subscription]
                                      [--top]

Examples

List federated credentials on an identity

az identity federated-credential list --identity-name myIdentity --resource-group myResourceGroup

Required Parameters

--identity-name

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.

--skiptoken

A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.

--subscription

Name or ID of subscription.

--top

Number of records to return.

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 federated-credential show

Preview

Show a federated identity credential on a user-assigned managed identity.

Show the details of a single federated identity credential configured on a user-assigned managed identity.

az identity federated-credential show --identity-name
                                      --name
                                      --resource-group
                                      [--subscription]

Examples

Show a federated credential by name

az identity federated-credential show --identity-name myIdentity --resource-group myResourceGroup --name myFederatedCredential

Required Parameters

--identity-name

The name of the identity resource.

--name -n

The name of the federated identity credential 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.

--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 federated-credential update

Preview

Update a federated identity credential on a user-assigned managed identity.

Update the issuer, audiences, subject, or claims-matching-expression of a federated identity credential, or update generic properties with --set/--add/--remove. Setting --subject clears any existing claims-matching-expression, and vice versa, since the two are mutually exclusive.

az identity federated-credential update --identity-name
                                        --name
                                        --resource-group
                                        [--acquire-policy-token]
                                        [--add]
                                        [--audiences]
                                        [--change-reference]
                                        [--claims-matching-expression-value]
                                        [--claims-matching-expression-version]
                                        [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                        [--issuer]
                                        [--remove]
                                        [--set]
                                        [--subject]
                                        [--subscription]

Examples

Update a federated credential's audiences

az identity federated-credential update --identity-name myIdentity --resource-group myResourceGroup --name myFederatedCredential --audiences api://AzureADTokenExchange

Switch a federated credential to use a claims matching expression

az identity federated-credential update --identity-name myIdentity --resource-group myResourceGroup --name myFederatedCredential --claims-matching-expression-version 1 --claims-matching-expression-value "claims['sub'] eq 'repo:contoso/my-repo:ref:refs/heads/main'"

Required Parameters

--identity-name

The name of the identity resource.

--name -n

The name of the federated identity credential 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.

--add

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

--audiences

The list of audiences that can appear in the issued token.

--change-reference

The related change reference ID for this resource operation.

--claims-matching-expression-value -cme-value

The wildcard-based expression for matching incoming claims. Cannot be used with --subject.

--claims-matching-expression-version -cme-version

Specifies the version of the claims matching expression used in the expression.

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

The URL of the issuer to be trusted.

--remove

Remove a property or an element from a list.

--set

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

--subject

The identifier of the external software workload. Cannot be used with --claims-matching-expression-value.

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