Lesstep
Azure Artifacts · Maven · Checked November 6, 2026

Azure Artifacts: Maven "401 Unauthorized" from a feed

Maven sends a user name and password to a repository only when settings.xml has a <server> whose <id> is the same as that repository's <id> in pom.xml. Without one, it asks the feed with no credentials, and Azure Artifacts answers 401. So the 401 means either that no server matched, or that the password in it is not accepted (a Stack Overflow question on it from a pipeline has been seen nearly 10,000 times).

When the Maven build fails in a pull request's build validation, the pull request waits on it: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in IntelliJ IDEA, and with Pro runs a failed build policy again once the feed lets the build in. Get it on JetBrains Marketplace

What it looks like

The server id and the repository id

In a pipeline: MavenAuthenticate before Maven

Credentials in place, still 401 or 403

Gradle

Azure DevOps pull requests in IntelliJ IDEA and Rider

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps, Azure Artifacts and Azure Pipelines are trademarks of Microsoft Corporation; Apache Maven and Maven are trademarks of the Apache Software Foundation; Gradle is a trademark of Gradle, Inc.; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft, the Apache Software Foundation, Gradle, Inc. or JetBrains.

More: pip: 401 Error, Credentials not correct for · npm: E401 Unable to authenticate · NuGet: Unable to load the service index for source · 日本語