Courseiva
Configure processes and communicationsmediumMultiple ChoiceObjective-mapped

AZ-400 Configure processes and communications Practice Question

Your team uses Azure DevOps and wants to automate the creation of work items when a build pipeline fails. The work item should be assigned to the last person who committed a change in the failed build. Which approach should you use?

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

Add the 'Create work item on failure' task to the build pipeline.

The 'Create work item on failure' task in Azure DevOps build pipelines automatically creates a bug work item and assigns it to the last committer of the failed build. Option A is incorrect because release pipelines are meant for deployment, not build-time tasks. Option C is incorrect because while Service Hooks can trigger on build failure, they require additional custom logic to assign the work item to the last committer, making it less straightforward. Option D is incorrect because using a PowerShell script to call the REST API is more complex and error-prone compared to the built-in task.

Answer analysis

Option-by-option breakdown

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

  • Create a release pipeline that triggers on build failure and creates a work item.

    Why it's wrong here

    Release pipelines are designed to deploy artifacts to environments, not to react to build failures. Although a release pipeline can be triggered by build completion, a failed build produces no deployable artifact, and release pipelines lack a native work-item-creation step, making this an unnatural workaround.

  • Add the 'Create work item on failure' task to the build pipeline.

    Why this is correct

    The built-in 'Create work item on failure' task runs on build failure and automatically creates a work item, such as a bug, with the ability to assign it to the last committer. It is the intended, simplest solution because it requires no custom code, external service hooks, or additional Azure DevOps REST API calls.

  • Configure a Service Hook to create a work item on build failure.

    Why it's wrong here

    A Service Hook triggers an external action on a build failure, but it cannot assign the work item to the last committer because it lacks access to the commit history of the build. The correct approach must use a build completion trigger in a YAML pipeline to query the commit author via the REST API. This option is tempting because Service Hooks do automate work item creation from pipeline events, which would be correct if the stem required only a generic notification without assignment logic.

  • Use a PowerShell script in the pipeline to call Azure DevOps REST API.

    Why it's wrong here

    A PowerShell script calling the Azure DevOps REST API could query the build's commit history and create an appropriately assigned work item, offering full control. However, this requires a PAT or OAuth token, manual API invocations, pagination handling, and error handling, making it far more complex than the built-in task, which already encapsulates this functionality.

Visual reference

Client DHCP Server 1 Discover (broadcast) 2 Offer (IP: 192.168.1.10) 3 Request (I accept) 4 Acknowledge (lease confirmed) DORA — the four-step DHCP lease process

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.