Azure / Azure/azure-cli

Login to Azure Devops Server - Failed to authenticate using the supplied token

Open
#32,378 7 comments 1 reaction 3 assignees Assigned to @jiasli View on GitHub
act-platform-engineering-squad Auto-Assign Auto-Resolve bug customer-reported DevOps Possible-Solution Service Attention Similar-Issue Upgrade
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

I created a PAT in collection, then I run against the collection
`az devops login --organization https://myAZDServer.mydomain.net/Sierac-Utilities/`
or against a project inside the collection
`az devops login --organization https://myAZDServer.mydomain.net/Sierac-Utilities/dotNet%20Projects`
I also tired
`echo "XXXXXXX2csmm636cy37wtsfpaw7eh22222222" | az devops login --organization https://azuredevops2k19.salam.net/Sierac-Utilities/`

I always get

> Failed to authenticate using the supplied token

I access my Azure Devops server using https, certificate valid in browsers(Edge, chrome) created by XCA certificate and key management

Image

What might be going wrong? Thanks for your help

### Related command

az devops login

### Errors

Failed to authenticate using the supplied token

### Issue script & Debug output

urllib3.connectionpool: Retrying (Retry(total=2, connect=3, read=3, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)'))': /Sierac-Utilities/_apis
urllib3.connectionpool: Starting new HTTPS connection (2): myserver.xxxxx.net:443
urllib3.util.retry: Incremented Retry for (url='/Sierac-Utilities/_apis'): Retry(total=1, connect=3, read=3, redirect=None, status=None)
urllib3.connectionpool: Retrying (Retry(total=1, connect=3, read=3, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)'))': /Sierac-Utilities/_apis
urllib3.connectionpool: Starting new HTTPS connection (3): myserver.xxxxx.net:443
urllib3.util.retry: Incremented Retry for (url='/Sierac-Utilities/_apis'): Retry(total=0, connect=3, read=3, redirect=None, status=None)
urllib3.connectionpool: Retrying (Retry(total=0, connect=3, read=3, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)'))': /Sierac-Utilities/_apis
urllib3.connectionpool: Starting new HTTPS connection (4): myserver.xxxxx.net:443
msrest.exceptions: Error occurred in request., SSLError: HTTPSConnectionPool(host='azuredevops2k19.salam.net', port=443): Max retries exceeded with url: /Sierac-Utilities/_apis (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)')))

### Expected behavior

To get logged to my Azure Devops Server collection

### Environment Summary

azure-cli 2.77.0 *

core 2.77.0 *
telemetry 1.1.0

Extensions:
account 0.2.5
automation 1.0.0b1
azure-devops 1.0.2
bastion 1.4.2
containerapp 1.2.0b3
interactive 1.0.0b1
next 0.1.3
resource-graph 2.1.1
spring-cloud 3.1.8
storage-preview 1.0.0b7

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\myuser.azure'
Extensions directory 'C:\Users\myuser\.azure\cliextensions'

Python (Windows) 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.