IMsalMtlsHttpClientFactory.GetHttpClient(X509Certificate2) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.