Courseiva
Design and implement source controleasyMultiple ChoiceObjective-mapped

AZ-400 Design and implement source control Practice Question

A team uses a monorepo with multiple projects in one Git repository. They want to enforce that each commit message must reference a work item from Azure Boards. Which branch policy should they configure?

⚠ Common exam trap

Candidates may confuse the native work item linking policy with actual commit message validation. The work item linking policy only requires a PR-level link, not per-commit message references.

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 a build validation policy to check commit messages

The 'Require a work item linking policy' in Azure Repos ensures each pull request is linked to a work item, but it does not validate that each commit message contains a reference. To enforce that commit messages themselves reference an Azure Boards work item, a build validation policy can run a script to verify the commit message format. Therefore, option D is the correct choice.

Answer analysis

Option-by-option breakdown

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

  • Automatically include work items in pull request descriptions

    Why it's wrong here

    This is not a branch policy; it's a repository setting that auto-links work items based on commit messages.

  • Require a work item linking policy in branch policies

    Why it's wrong here

    Require a work item linking policy in branch policies is a native Azure DevOps branch policy that blocks pull request completion until at least one work item is linked to the PR. This directly enforces traceability from code changes to backlog items, making it the correct mechanism for a monorepo where multiple projects share one repository.

  • Configure a minimum number of reviewers policy

    Why it's wrong here

    Configuring a minimum number of reviewers policy only enforces that a specified number of people approve the pull request; it has no mechanism to validate or require linked work items. Thus, it can be used alongside a work item linking policy but does not by itself ensure any work item is associated with the change.

  • Use a build validation policy to check commit messages

    Why this is correct

    A build validation policy runs a configured pipeline (e.g., a script that greps commit messages) and can fail the build if a message lacks a work item ID, but this is an indirect, custom workaround. It does not natively enforce work item linking in the pull request metadata, is prone to bypass via malformed commit messages, and is not the designated Azure DevOps policy for this requirement.

Go deeper

Related to this question

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 →

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.