Which Version of MSAL are you using ?
MSAL 4.17.1.0
Platform
.NET Framework 4.6.2
What authentication flow has the issue?
Client credentials
Is this a new or existing app?
This is a new app or experiment
Repro
ServicePointManager.DefaultConnectionLimit = 100;
Console.WriteLine($"My DefaultConnectionLimit {ServicePointManager.DefaultConnectionLimit}"); // prints 100
var aadApplication = ConfidentialClientApplicationBuilder.Create("(redacted)")
.WithClientSecret("(redacted)")
.WithAuthority(AzureCloudInstance.AzurePublic, "(redacted)")
.Build();
var authResponse = await aadApplication
.AcquireTokenForClient(new[] { "(redacted)" })
.WithSendX5C(true)
.ExecuteAsync();
Console.WriteLine($"DefaultConnectionLimit after using MSAL {ServicePointManager.DefaultConnectionLimit}"); // prints 30
Expected behavior
MSAL should not change ServicePointManager.DefaultConnectionLimit.
Actual behavior
MSAL overrides the ServicePointManager.DefaultConnectionLimit set by the application. This is an global setting which should not be changed by a client library.
Possible Solution
Do not set ServicePointManager.DefaultConnectionLimit (or make it in an opt-in feature).
I agree @jonpayne , MSAL should not change global settings.
Fix is in 4.18