Freigeben über


IMsalMtlsHttpClientFactory.GetHttpClient(X509Certificate2) Method

Definition

Returns an HttpClient configured with a certificate for mutual TLS authentication. This method enables advanced MTLS scenarios within Azure AD communications in MSAL.

public System.Net.Http.HttpClient GetHttpClient(System.Security.Cryptography.X509Certificates.X509Certificate2 x509Certificate2);
abstract member GetHttpClient : System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.Net.Http.HttpClient
Public Function GetHttpClient (x509Certificate2 As X509Certificate2) As HttpClient

Parameters

x509Certificate2
X509Certificate2

The certificate to be used for MTLS authentication.

Returns

An HttpClient instance configured with the specified certificate.

Applies to