AZ-400 Practice Question: Design and implement build and release pipelines
Your release pipeline deploys to multiple environments sequentially: Dev, QA, Staging, Production. You need to implement manual approval gates before Staging and Production deployments. Which TWO configurations should you use? (Choose two.)
⚠ Common exam trap
A common mix-up: candidates confuse post-deployment approvals (which happen after deployment) with pre-deployment approvals (which gate the deployment), or they incorrectly think branch policies or manual validation tasks are the correct way to add manual approval gates in a release pipeline.
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 'Approvals and gates' settings in the release pipeline stage.
The 'Approvals and gates' settings in a release pipeline stage allow you to configure pre-deployment approvals, which require designated users to approve the deployment before it proceeds. This is the standard mechanism in Azure DevOps for implementing manual approval gates. Option E is correct because adding a pre-deployment approval gate specifically to the Staging and Production stages ensures that deployments to these environments are blocked until the required approvals are granted, meeting the requirement for manual approval before Staging and Production.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Add a post-deployment approval gate to the Dev and QA stages.
Why it's wrong here
Post-deployment approvals run after the stage has already deployed, so they cannot prevent the deployment from starting or act as a pre-flight checkpoint. Since the requirement is to gate the release before it proceeds to later environments, placing post-deployment gates on Dev and QA does not satisfy that need.
- ✓
Use the 'Approvals and gates' settings in the release pipeline stage.
Why this is correct
In classic release pipelines, the 'Approvals and gates' settings are configured per stage and allow you to add pre-deployment and post-deployment approvals, as well as gates such as query-based checks or Azure Monitor alerts. Pre-deployment approvals are the built-in mechanism to pause the pipeline before a stage runs, ensuring authorized reviewers approve the release before it reaches environments like Staging and Production.
- ✗
Configure branch policy on the release branch to require approvals.
Why it's wrong here
Branch policies in Azure Repos govern pull request workflows and control when code is allowed to merge into a branch. They have no effect on release pipeline execution or stage-level deployment approvals, so configuring a branch policy cannot insert manual sign-off into a release pipeline.
- ✗
Add a 'Manual Validation' task in the YAML pipeline.
Why it's wrong here
Azure DevOps does not have a built-in 'Manual Validation' task for YAML pipelines; instead, YAML pipelines use the `approvals` keyword defined on the environment to require manual approval before a job runs. Adding a nonexistent task would not provide the required gating, and the scenario's stage-based terminology indicates a classic release pipeline.
- ✓
Add a pre-deployment approval gate to the Staging and Production stages.
Why this is correct
Pre-deployment approval gates on the Staging and Production stages are the correct way to pause the release before those specific deployments begin, ensuring sequential control and human sign-off. This directly matches the requirement to gate deployments to later environments, making it a valid approach alongside configuring approval settings generally in the release pipeline.
Visual reference
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
Key term
Stage
A stage is a discrete phase in a software development or deployment pipeline where code is built, tested, integrated, or released in a controlled environment.
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.