AZ LOGIN - fails with certificate issue

Ernesto 61 Reputation points
2022-12-27T15:17:29.167+00:00

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: unable to get local issuer certificate (_ssl.c:997)')))
Certificate verification failed. This typically happens when using Azure CLI behind a proxy that intercepts traffic with a self-signed certificate. Please add this certificate to the trusted CA bundle. More info: https://learn.microsoft.com/cli/azure/use-cli-effectively#work-behind-a-proxy.

how can I fix it?

Community Center | Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Md. Ashifuzzaman 81 Reputation points
    2022-12-27T17:07:48.54+00:00

    The error usually occurs when you are using a system with a proxy configured.
    For best practices, refer: https://learn.microsoft.com/en-us/cli/azure/use-cli-effectively?tabs=bash%2Cbash2#work-behind-a-proxy

    Please make sure you are setting an environment variable REQUESTS_CA_BUNDLE according to your OS as documented.
    Then add the proxy server's certificate to the CA bundle certificate file.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.