Draft
[Core] az login: honor AZURE_CLI_DISABLE_CONNECTION_VERIFICATION for MSAL requests#33725
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Copilot
AI
changed the title
[WIP] Fix az login to pass verify=False to MSAL
[Core] az login: honor AZURE_CLI_DISABLE_CONNECTION_VERIFICATION for MSAL requests
Jul 14, 2026
Collaborator
|
az login |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related command
az loginDescription
AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1had no effect onaz login. The env var only patched post-auth API sessions (via_debug.py), while MSAL's initial OIDC discovery request tologin.microsoftonline.comalways ran withverify=True. Behind TLS inspection proxies (e.g. Zscaler), login failed withSSLCertVerificationError.Root cause:
Identity._msal_app_kwargsnever set MSAL'sverifyparameter.identity.py:_msal_app_kwargsnow passesverify=Falsewhenshould_disable_connection_verify()is true (reusing the existingcore/util.pyhelper). This propagates toPublicClientApplication/ConfidentialClientApplication/SP credentials, covering the login discovery request.verifykwarg by default, andverify=Falsewhen the env var is set.Testing Guide
Unit tests:
python -m unittest azure.cli.core.auth.tests.test_identity.TestIdentityHistory Notes
[Core]
az login: Passverify=Falseto MSAL whenAZURE_CLI_DISABLE_CONNECTION_VERIFICATIONis set, so login works behind TLS inspection proxiesThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.