Skip to content

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

Open
@svrooij

Description

@svrooij

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedWe'd appreciate your help

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions