Courseiva

AZ-400 Configure processes and communications Practice Question

Exhibit

{
  "policies": {
    "required_reviewers": 2,
    "dismiss_stale_reviews": true,
    "require_code_owner_review": true,
    "require_last_push_approval": true,
    "allowed_merge_types": ["squash", "rebase"]
  }
}

Refer to the exhibit. The JSON above shows a branch policy configuration for the main branch in Azure Repos. A developer pushes a third commit to an existing pull request after two reviewers have already approved. What happens?

⚠ Common exam trap

Do not confuse 'require_last_push_approval' with 'dismiss_stale_reviews'. The former only affects the last pusher's approval, while the latter resets all approvals on any new push.

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 existing approvals remain valid because dismiss_stale_reviews is false.

In Azure Repos, the 'Block on last push' policy (require_last_push_approval) only revokes an approval from the user who made the most recent push, preventing them from approving their own changes. It does not invalidate approvals from other reviewers. The setting that resets all approvals when new commits are pushed is 'Reset code reviewer votes when there are new changes' (dismiss_stale_reviews). Since dismiss_stale_reviews is false in the given configuration, the two existing approvals remain valid when the developer pushes a third commit.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    The existing approvals remain valid because dismiss_stale_reviews is false.

    Why this is correct

    Although dismiss_stale_reviews is false, the branch policy also sets require_last_push_approval to true. In Azure DevOps, require_last_push_approval forces all previous approvals to be invalidated whenever a new push occurs, regardless of whether stale review dismissals are enabled. Thus, the current commits have no valid approval, and the PR cannot be merged.

  • ✗

    The pull request is automatically merged because allowed merge types include squash.

    Why it's wrong here

    Allowing squash as a merge type only controls which merge strategies are available for completion; it does not automatically merge the pull request. A PR is only auto-completed when all branch policies are satisfied, and here the approval policy is not met due to require_last_push_approval dismissing approvals after the last push. Thus, the merge is blocked, not automatic.

  • ✗

    The approvals are dismissed because require_last_push_approval is true.

    Why it's wrong here

    This is the correct explanation. With require_last_push_approval set to true, the policy explicitly requires that the most recent push in the pull request has an appproval; any new push automatically dismisses all earlier approvals. Even if dismiss_stale_reviews is false, the last-push requirement takes precedence, so the current commits are unapproved and the merge is blocked.

  • ✗

    The pull request is blocked because the merge type is not allowed.

    Why it's wrong here

    Squash and rebase are both explicitly allowed in the merge type policy, so the merge type is not blocking the pull request; the actual block is due to the missing valid approval after the last push.

Go deeper

Related to this question

About these practice questions

One of 696 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.