easyMultiple ChoiceObjective-mapped
AZ-400 A company uses Azure DevOps to manage code Practice Question
A company uses Azure DevOps to manage code. They want to enforce that all changes to the main branch must go through a pull request with at least two reviewers. What should they configure?
⚠ Common exam trap
Candidates often confuse repository permissions (which control access) with branch policies (which control workflow and quality gates), leading them to select Option C instead of the correct branch policy configuration.
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
✓
Branch policy on the main branch
Branch policies in Azure DevOps allow you to enforce requirements on pull requests targeting a specific branch. By configuring a branch policy on the main branch, you can require a minimum number of reviewers (e.g., two) and mandate that all changes must go through a pull request. This ensures that no direct commits bypass the review process.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Branch policy on the main branch
Why this is correct
Branch policies on the main branch can enforce a minimum number of reviewers and require successful pull request reviews before merging, making them the standard mechanism to ensure code review compliance. They also block direct pushes, forcing all changes through the review process.
- ✗
Add a tag to the main branch
Why it's wrong here
Adding a tag to the main branch simply marks a point in history, typically for release versioning, and does not enforce any workflow or review requirements. Tags are static metadata and do not prevent commits or require approvals.
- ✗
Repository permissions
Why it's wrong here
Repository permissions govern user and group access levels (e.g., read, write, contribute) but do not enforce a required review process. Even with restricted permissions, a user with push rights can commit without a review unless branch policies are configured.
- ✗
Configure a service hook
Why it's wrong here
Service hooks in Azure DevOps are outbound HTTPS callbacks to external systems (e.g., Slack, Microsoft Teams, or custom endpoints) that fire asynchronously when events such as pull request creation or build completion occur. They are notifications only—the external system cannot mutate or gate Azure DevOps state, and there is no built-in mechanism for the hook to block merging or require approvals. Because they operate entirely outside the policy evaluation engine, they cannot enforce a mandatory code review process on the main branch.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
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.
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.
About these practice questions
This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.