Error when using Azure Login V2
We see the below error when using a service principal to authenticate:
Error: /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.25.8) or chardet (5.2.0) doesn't match a supported version! warnings.warn("urllib3 () or chardet () doesn't match a supported
The GitHub Actions log is below:
Run azure/login@v2 with: creds: *** enable-AzPSSession: false environment: azurecloud allow-no-subscriptions: false audience: api://AzureADTokenExchange auth-type: SERVICE_PRINCIPAL Running Azure CLI Login. /usr/local/bin/az cloud set -n azurecloud Done setting cloud: "azurecloud" Note: Azure/login action also supports OIDC login mechanism. Refer https://github.com/azure/login#configure-a-service-principal-with-a-federated-credential-to-use-oidc-based-authentication for more details. Attempting Azure CLI login by using service principal with secret... Error: /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.25.8) or chardet (5.2.0) doesn't match a supported version! warnings.warn("urllib3 () or chardet () doesn't match a supported "
Error: /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.25.8) or chardet (5.2.0) doesn't match a supported version! warnings.warn("urllib3 () or chardet () doesn't match a supported "
Subscription is set successfully. Azure CLI login succeeds by using service principal with secret.
The login succeeds and all subsequent steps go through. What is the resolution?
Hi @random-forest1, I have searched this on Internet, the issue maybe because of different requests module installed by the OS and the python dependencies for your local installation.
It can be solved by upgrading requests:
pip install requests
or
pip3 install requests
See https://stackoverflow.com/questions/50202238/python-pip-requestsdependencywarning-urllib3-1-9-1-or-chardet-2-3-0-doe
If this cannot solve your problem, please provide the version of azure-cli and python you are using, for me to better assist you with your question.
I'll close this issue since no feedback from author for a long time. Feel free to reopen it.