dev-proxy icon indicating copy to clipboard operation
dev-proxy copied to clipboard

[BUG]: AzureCliCredential does not work when proxy is running

Open svrooij opened this issue 9 months ago • 11 comments

Description

It seems that the AzureCliCredential in the Azure.Identity nuget package. No longer works when the proxy is running.

here is the code to validate.

Expected behaviour

I expected the proxy to only change http requests that are in the list and not http requests to other services, but is seems to somehow intercept all https requests.

Actual behaviour

It refuses to give me a token

Steps to reproduce

  1. Check out this code
  2. Run az login if not logged in with the Azure CLI already
  3. Change the tenantId in the code the the actual tenant ID
  4. Start the proxy
  5. Validate that you're getting an error when starting the program
  6. Stop the proxy
  7. Validate that it now works
  8. Try out to figure a solution 🎉

Microsoft 365 Developer Proxy Version

0.11.1

Operating system (environment)

Windows

Shell

PowerShell

Additional Info

My best guess is that the Azure CLI is doing some sort of certificate pinning on the login.microsoftonline.com endpoint but this is pure me guessing what the issue might be.

svrooij avatar Oct 02 '23 14:10 svrooij