Skip to content

az CLI fails with SSL certificate verification error on this dev machine — blocks all Azure resource creation #32

Description

@amar-python

Problem

Every az CLI call from this dev machine that needs a fresh login token fails with:

ERROR: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /<tenant-id>/v2.0/.well-known/openid-configuration (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)')))

Confirmed with plain read-only calls (az group show, az account show for cached/basic info works, but calls needing a fresh token fail). Reproduces identically regardless of sandboxing — this is the local machine's network/certificate configuration, not tool-specific.

Likely cause

The network path from this machine to login.microsoftonline.com appears to go through a proxy or endpoint-security product that intercepts HTTPS with its own certificate. Python's certifi bundle (used by the az CLI) doesn't include that proxy's root CA, so TLS verification fails before authentication can even happen.

Confirmed: no REQUESTS_CA_BUNDLE or similar override is currently set; certifi is using its stock bundle (certifi.where() → the default cacert.pem).

Impact

Blocks any az CLI action that needs a live token — including the one-time Azure setup in #31 (creating Terraform remote state storage for test/staging, and eventually terraform init/apply for those stacks, since the azurerm provider goes through the same auth path).

Fix options

  1. If this is a corporate/antivirus SSL-inspecting proxy: get the proxy's root CA certificate from IT and either import it into the Windows trusted root store, or point REQUESTS_CA_BUNDLE at a combined bundle that includes it.
  2. Sidestep the local machine entirely: run the az commands from Azure Cloud Shell (portal.azure.com) or another machine that isn't behind the intercepting proxy.

Not attempted

Disabling TLS certificate verification (e.g. --debug flags or connection-verification overrides) — that defeats the purpose of the check and isn't a call to make unilaterally on an authenticated cloud CLI session without knowing whether the intercepting proxy is actually trusted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions