<PackageReference Include="Azure.Core" Version="1.53.0" />

Azure.Identity.ClientAssertionCredential

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

Protected constructor for mocking.

public ClientAssertionCredential(string tenantId, string clientId, Func<CancellationToken, Task<string>> assertionCallback, ClientAssertionCredentialOptions options = null)

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

public ClientAssertionCredential(string tenantId, string clientId, Func<string> assertionCallback, ClientAssertionCredentialOptions options = null)

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