Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected override Lazy<IAuthenticator> BuildIAuthenticator()
return new Lazy<IAuthenticator>(
() =>
{
var clientApplication = CreateClientApplication(clientCertificate, MicrosoftAppId, CustomHttpClient);
var clientApplication = CreateClientApplication(clientCertificate, MicrosoftAppId, sendX5c, CustomHttpClient);
return new MsalAppCredentials(
clientApplication,
MicrosoftAppId,
Expand All @@ -151,11 +151,11 @@ protected override Lazy<IAuthenticator> BuildIAuthenticator()
LazyThreadSafetyMode.ExecutionAndPublication);
}

private Identity.Client.IConfidentialClientApplication CreateClientApplication(X509Certificate2 clientCertificate, string appId, HttpClient customHttpClient = null)
private Identity.Client.IConfidentialClientApplication CreateClientApplication(X509Certificate2 clientCertificate, string appId, bool sendX5c, HttpClient customHttpClient = null)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add default value (I assume false) not to make it a breaking change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a private method used only once in this class so we are fine like this.

{
var clientBuilder = Identity.Client.ConfidentialClientApplicationBuilder.Create(appId)
.WithAuthority(new Uri(OAuthEndpoint), ValidateAuthority)
.WithCertificate(clientCertificate);
.WithCertificate(clientCertificate, sendX5c);

if (customHttpClient != null)
{
Expand Down