Skip to content

Unable to login to AzureCloud using latest version of azure-cli 2.0.31 #6221

@radhikagupta5

Description

@radhikagupta5

Installed CLI with these instructions:

Instructions from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest

AZ_REPO=$(lsb_release -cs)
echo "Installing Azure CLI from $AZ_REPO"
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
sudo apt-get install apt-transport-https -y
sudo apt-get update -y
sudo apt-get install azure-cli -y

Register to AzureCloud works
Login to AzureCloud using following fails:
az login
--service-principal
--username $SPN_CLIENT_ID
--password $SPN_CLIENT_SECRET
--tenant $TENANT_ID

Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/token (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

If I bypass SSL auth by doing following this works:
export ADAL_PYTHON_SSL_NO_VERIFY=1
export AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    AuthquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions