你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ClientAssertionCredential Class

Definition

Enables authentication of a Microsoft Entra service principal using a signed client assertion.

public class ClientAssertionCredential : Azure.Core.TokenCredential
type ClientAssertionCredential = class
    inherit TokenCredential
Public Class ClientAssertionCredential
Inherits TokenCredential
Inheritance

Constructors

ClientAssertionCredential()

Protected constructor for mocking.

ClientAssertionCredential(String, String, Func<CancellationToken,Task<String>>, ClientAssertionCredentialOptions)

Creates an instance of the ClientAssertionCredential with an asynchronous callback that provides a signed client assertion to authenticate against Microsoft Entra ID.

ClientAssertionCredential(String, String, Func<String>, ClientAssertionCredentialOptions)

Creates an instance of the ClientAssertionCredential with a synchronous callback that provides a signed client assertion to authenticate against Microsoft Entra ID.

Methods

CreateTokenOptions(IReadOnlyDictionary<String,Object>)

Creates a new instance of GetTokenOptions using the provided properties.

(Inherited from TokenCredential)
GetToken(GetTokenOptions, CancellationToken)

Gets an AuthenticationToken for the provided properties.

(Inherited from TokenCredential)
GetToken(TokenRequestContext, CancellationToken)

Obtains a token from Microsoft Entra ID, by calling the assertionCallback specified when constructing the credential to obtain a client assertion for authentication.

GetTokenAsync(GetTokenOptions, CancellationToken)

Gets an AuthenticationToken for the provided properties.

(Inherited from TokenCredential)
GetTokenAsync(TokenRequestContext, CancellationToken)

Obtains a token from Microsoft Entra ID, by calling the assertionCallback specified when constructing the credential to obtain a client assertion for authentication.

Applies to