次の方法で共有


CredentialDescription.TokenExchangeUrl Property

Definition

(Microsoft Entra specific) Value that can be used to configure the token exchange resource url in the case of federation identity credentials with Managed identity.

public string? TokenExchangeUrl { get; set; }
member this.TokenExchangeUrl : string with get, set
Public Property TokenExchangeUrl As String

Property Value

Examples

The JSON fragment below describes a workload identity federation with a user assigned managed identity:

{
    "ClientCredentials": [
    {
        "SourceType": "SignedAssertionFromManagedIdentity",
        "TokenExchangeUrl": "api://AzureADTokenExchangeChina"
    }]
}

The code below describes programmatically in C#, the same workload identity federation with a user assigned managed identity.

CredentialDescription credentialDescription = new CredentialDescription
{
    SourceType = CredentialSource.SignedAssertionFromManagedIdentity,
    TokenExchangeUrl = "api://AzureADTokenExchangeChina"
};

Remarks

If you want to use the default token exchange resource "api://AzureADTokenExchange", don't provide a token exchange url.

Applies to