Microsoft DevOps Engineer Expert AZ-400 Practice Question

The main branch of an Azure Repos Git repository must accept changes only through pull requests. Requirements are: at least two human reviewers, the code author may not approve, any new push must invalidate existing approvals, a CI build must succeed before completion, and direct pushes, force pushes, and branch deletion must all be blocked. Which configuration meets every requirement while still allowing pull-request merges into main?

  • Apply a branch policy that automatically adds two reviewers but allows author approval, keeps existing approvals after updates, and adds required build validation. Finally, lock the main branch so no one can push.

  • Create a branch policy on main that requires two reviewers, disallows author approval, resets approvals on new pushes, and adds a required build-validation pipeline. Then use Branch security to deny Force push and Delete permissions for the Contributors group, leaving Contribute unset.

  • Configure environment approvers in the release pipeline, trigger it from main, leave Contribute permission set to Allow for developers, and mark build validation as optional in the branch policy.

  • Enable repository-level settings to require signed commits and restrict merges to squash only; do not modify branch security. Rely on developers to open pull requests voluntarily.

Microsoft DevOps Engineer Expert AZ-400
Design and implement a source control strategy
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot