AZ-400 Practice Question: Design and implement build and release pipelines
You have a YAML pipeline that builds a Java project using Maven. The pipeline uses a private artifact feed in Azure Artifacts. You need to authenticate to the feed from the pipeline. Which authentication method should you use?
⚠ Common exam trap
Test-takers frequently confuse the authentication task with the package type (e.g., choosing 'npmAuthenticate' for a Java project because they think 'npm' is generic), but Azure Artifacts requires a task specific to the client tool (Maven) and its configuration file (settings.xml).
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use the 'MavenAuthenticate' task with a settings.xml file.
The 'MavenAuthenticate' task is specifically designed to authenticate Maven builds against Azure Artifacts feeds. It injects credentials into a settings.xml file, which Maven uses to resolve dependencies from the private feed. This task handles the OAuth token exchange required for Azure DevOps authentication.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the 'PipAuthenticate' task with a pip.conf file.
Why it's wrong here
The PipAuthenticate task is specifically designed for Python package feeds in Azure Artifacts, not Java or Maven builds. It relies on a pip.conf file to authenticate pip clients, which is irrelevant to a Maven-based Java pipeline.
- ✗
Use the 'npmAuthenticate' task with a .npmrc file.
Why it's wrong here
The npmAuthenticate task is intended for npm package feeds and uses a .npmrc file to store registry credentials. This is not applicable to a Java project built with Maven, which requires Maven-specific authentication via a settings.xml file.
- ✓
Use the 'MavenAuthenticate' task with a settings.xml file.
Why this is correct
The MavenAuthenticate task is the correct choice because it directly configures Maven's settings.xml with the appropriate credentials for Azure Artifacts. This enables the Java project to authenticate when downloading dependencies or publishing artifacts to a Maven feed, which is exactly what this pipeline requires.
- ✗
Use the 'NuGetAuthenticate' task with a nuget.config file.
Why it's wrong here
The NuGetAuthenticate task is meant for NuGet package feeds, used in .NET projects, and relies on a nuget.config file for authentication. Since the pipeline builds a Java project with Maven, this task is inappropriate because NuGet is not part of the Maven build process.
Visual reference
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Task
A Task in Azure DevOps is a predefined, reusable step that performs a specific action during a build or release pipeline, like compiling code or running tests.
Key term
Azure DevOps
Azure DevOps is a Microsoft service that provides development tools for planning, building, testing, and deploying software applications using automated pipelines and collaboration features.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.