Azure / Azure/azure-cli

az cli - ssl - "Basic Constraints of CA cert not marked critical"

Open
#32,749 8 comments 0 reactions 2 assignees Claimed by @ReaNAiveD View on GitHub
Account act-identity-squad Auto-Assign Azure CLI Team customer-reported Login Possible-Solution question Similar-Issue
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Hey all. In our corporate environment, we MiTM our traffic using a network monitoring tool. We get this below error when using `az login`, and we have already set the related SSL cert environment variables.

This error below makes me feel like our cert that we're trusting is missing some sort of field. Is there any way we can fix this, or override the validation and still trust our cert?

```
"""HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /organizations/v2.0/.well-known/openid-configuration (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Basic Constraints of CA cert not marked critical (_ssl.c:1032)')))"""
```

### Related command

az login

### Errors

"""HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /organizations/v2.0/.well-known/openid-configuration (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Basic Constraints of CA cert not marked critical (_ssl.c:1032)')))"""

### Issue script & Debug output

```
"""HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /organizations/v2.0/.well-known/openid-configuration (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Basic Constraints of CA cert not marked critical (_ssl.c:1032)')))"""
```

### Expected behavior

`az login` works.

### Environment Summary

azure-cli 2.83.0

core 2.83.0
telemetry 1.1.0

Dependencies:
msal 1.35.0b1
azure-mgmt-resource 23.3.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\User\.azure'
Extensions directory 'C:\Users\User\.azure\cliextensions'

Python (Windows) 3.13.11 (tags/v3.13.11:6278944, Dec 5 2025, 16:26:58) [MSC v.1944 64 bit (AMD64)]

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.