For the runtime's default proxy selection with the current security context:

var handler = new System.Net.Http.HttpClientHandler
{
    UseProxy = true,
    Proxy = null,
    DefaultProxyCredentials =
        System.Net.CredentialCache.DefaultCredentials
};
var client = new System.Net.Http.HttpClient(handler);

DefaultProxyCredentials applies under the precise conditions shown: UseProxy = true and Proxy = null. The default policy still chooses the intermediary.

Authentication recipientInput
Default/discovered proxyHttpClientHandler.DefaultProxyCredentials
Explicit WebProxy objectThat object's Credentials
Destination serverHttpClientHandler.UseDefaultCredentials

These similarly named inputs are not interchangeable. Set the handler before its first request and retain its client for the workload.

The proxy must accept the account through a scheme supported by both ends. A service's current identity can differ from the interactive user whose browser already works.

Erthyglow kevrennek