anonymous user-msft I see in Fiddler that there are four requests like the one described under going before the code gives up and gives an exception:
GET /metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fxxx-xxxx-xxxxx.azconfig.io HTTP/1.1
Metadata: true
x-ms-client-request-id: 6700f178-af2e-4792-9a2f-5f43c382c216
x-ms-return-client-request-id: true
User-Agent: azsdk-net-Identity/1.1.1 (.NET Framework 4.8.4250.0; Microsoft Windows 10.0.19041 )
Request-Id: |ce277704-41db6514f91cf479.
Host: 169.254.169.254
Connection: Keep-Alive
The reponse is:
<html><head><title>504 Gateway Timeout</title></head>
<body><h1>Gateway Timeout</h1>
<p>Server error - server 169.254.169.254 is unreachable at this moment.<br><br>Please retry the request or contact your administrator.<br></p>
<!--Zscaler/6.0--></body></html>
When running the code with the workaround explained above I only see calls to login.microsoft.com.