AZ LOGIN | ERROR Azure CLI behind a proxy that intercepts traffic

Tomar, Abhishek 1 Reputation point


Can anyone please help with this, currently I'm on VPN and trying to log in with my local system but my end goal is I have to do the same thing in my CI/CD JenkinsFile and on my Jenkins az CLI is installed but not possible to use the azure plugin so I have to use simple CLI in my Jenkins file.

I am trying to deploy dotnet core app on the app service using JenkinsFile

Error On My Local System with VPN

az login -u -p ****** HTTPSConnectionPool(host='', 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: self signed certificate in certificate chain (_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:

JenkinFile ERROR


  • az login -u -p ******
    ERROR: Get Token request returned http error: 400 and server response: {"error":"invalid_grant","error_description":"AADSTS50126: Error validating credentials due to invalid username or password.\r\nTrace ID: 217bbbfe-2d06-4a02-99f6-4321821c8d00\r\nCorrelation ID: 84cc5c0e-05ef-4f18-bdeb-ee75e68056d7\r\nTimestamp: 2022-08-23 16:41:56Z","error_codes":[50126],"timestamp":"2022-08-23 16:41:56Z","trace_id":"217bbbfe-2d06-4a02-99f6-4321821c8d00","correlation_id":"84cc5c0e-05ef-4f18-bdeb-ee75e68056d7","error_uri":""}


Not Monitored
Not Monitored
Tag not monitored by Microsoft.
30,192 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JimmySalian-2011 36,446 Reputation points


    For this issue you will need to configure some settings for Proxy and also steps are listed for settings up the proxy configuration in python but you can follow the process of jenkin. azure-sdk-configure-proxy

    I will suggest you to please follow this link use-cli-effectively

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments