AZ-400 Practice Question: Design and implement a source control strategy
Exhibit
Refer to the exhibit.
```json
{
"branchProtectionRules": [
{
"branch": "main",
"requiredStatusChecks": ["build", "test"],
"enforceAdmins": true,
"requiredPullRequestReviews": {
"requiredApprovingReviewCount": 2,
"dismissStaleReviews": true
}
}
]
}
```You are reviewing the branch protection policy for the main branch in an Azure DevOps repository. Based on the exhibit, what happens when a stale review exists on a pull request after new changes are pushed?
⚠ Common exam trap
Many exam-takers confuse 'stale reviews are not dismissed' with the default behavior of Azure DevOps, but the exhibit explicitly shows the 'Reset code reviewer votes when there are new changes' checkbox is enabled, which forces dismissal.
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
✓
The stale review is automatically dismissed, and the PR requires new approvals
The branch protection policy for the main branch has 'Reset code reviewer votes when there are new changes' enabled. When a stale review exists after new changes are pushed, Azure DevOps automatically dismisses the previous approval(s) and requires new approvals to meet the minimum number of reviewers (2). This ensures that reviewers re-evaluate the latest code changes before the pull request can be merged.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Admins are exempt from the review requirement
Why it's wrong here
In Azure DevOps, the `enforceAdmins` setting is an explicit part of the branch protection policy, and in this scenario it is enabled. When `enforceAdmins` is true, the policy applies equally to project administrators, meaning they are not automatically exempt from the required reviewer count. Even though admins have elevated permissions, this branch policy forces them to submit to the same minimum number of approvals before a merge is allowed. Because the policy is configured with `enforceAdmins` enabled, any assumption that admins bypass the review requirement is incorrect.
- ✓
The stale review is automatically dismissed, and the PR requires new approvals
Why this is correct
Because `dismissStaleReviews` is enabled, any approval given before a new commit that changes the code is automatically dismissed, and the PR must obtain fresh approvals from the required number of reviewers before it can be completed.
- ✗
The PR still requires only 2 approvals, but stale reviews are not dismissed
Why it's wrong here
The `dismissStaleReviews` setting is actually `true`, so stale reviews are dismissed upon new commits; the policy continues to require the configured number of approvals, but the previous approvals no longer count, making this option wrong.
- ✗
The PR can be merged even without the required reviews
Why it's wrong here
Required reviews are enforced in this branch policy, so the pull request cannot be merged until the required number of reviewers has approved the latest changes; the merge is blocked otherwise, making this option incorrect.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Branch
A branch is a pointer to a specific commit in a version control system that allows you to work on features or fixes in isolation from the main codebase.
Key term
DevOps
DevOps is a set of practices that combines software development (Dev) and IT operations (Ops) to shorten the development lifecycle and deliver high-quality software continuously.
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.