Lesstep
Azure DevOps Services and Server · git over HTTPS · Checked October 28, 2026

Azure DevOps: "fatal: Authentication failed for 'https://dev.azure.com/…'"

Git prints this when Azure DevOps answered HTTP 401 to the password git sent: for Azure Repos, a personal access token (PAT), or the OAuth token Git Credential Manager signs in with. Azure DevOps does not say why it refused it; the answer is empty. So look at the token itself: it expired, was revoked, became inactive, was made for another organization or lacks the Code scope, or the account lost access.

The whole answer

What dev.azure.com answered on October 28, 2026 to a token it did not take, for a repository in an organization that exists:

git ls-remote https://dev.azure.com/<organization>/<project>/_git/<repository>
fatal: Authentication failed for 'https://dev.azure.com/<organization>/<project>/_git/<repository>/'

The HTTP answer behind it:

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm="https://tfsprod….app.visualstudio.com/"
Content-Length: 0

What else we saw that day:

Why Azure DevOps refuses a token

Microsoft's Use personal access tokens (updated September 21, 2026) answers "Why did my PAT stop working?" with this list:

Two more that look the same from git: a PAT is made for one organization, and the organization is the first part after dev.azure.com/ in the remote URL (git remote -v); and PATs made for "All accessible organizations" are being retired (the retirement and its postponed date). On Azure DevOps Server, Microsoft adds that IIS Basic Authentication prevents PAT authentication and should stay disabled.

Find which one

  1. Your token list. In Azure DevOps, User settings › Personal access tokens shows each PAT's status, organization, scopes and expiration. A PAT named git: https://dev.azure.com/<organization> on <computer> was made by Git Credential Manager when git first connected.
  2. The audit log, for an organization administrator: Organization settings › Auditing, filtered for Token.PatExpiredEvent, Token.PatRevokeEvent, Token.PatSystemRevokeEvent (revoked by Azure DevOps) and Token.PatPublicDiscoveryEvent (found in a public repository). Microsoft keeps audit events for 90 days and does not log when a PAT was used.
  3. The account. Open the repository in the browser with the same account. If Azure DevOps asks you to sign in first, see TF401444.

When git keeps sending the old token

Azure DevOps pull requests in IntelliJ IDEA and Rider

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, signs in to the REST API with its own personal access token, kept in the IDE's password safe apart from git's, or with the Azure CLI. When Azure DevOps refuses the token, it says so and names the usual reasons: expired, without the Code scope, or made for "All accessible organizations". The review inbox is free; voting, commenting and completing are Pro (US$1 a month, with a 30-day trial).

Get it on JetBrains Marketplace

Azure DevOps is a trademark of Microsoft Corporation; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: "VS30063: You are not authorized to access https://dev.azure.com" (the same refusal in .NET tools) · "TF400813: The user … is not authorized" · 日本語