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

Tomar, Abhishek 1 Reputation point
2022-08-23T16:47:47.72+00:00

Hi,

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 abc@companynamecloud.com -p ****** 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: 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: https://learn.microsoft.com/cli/azure/use-cli-effectively#work-behind-a-proxy.

JenkinFile ERROR

`

  • az login -u abc@companynamecloud.com -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":"https://login.microsoftonline.com/error?code=50126"}

`

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

1 answer

Sort by: Most helpful
  1. JimmySalian-2011 41,926 Reputation points
    2022-08-24T09:47:57.51+00:00

    Hi,

    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