Integrating Azure Pipelines and Microsoft Teams for Failed Build Notifications | Microsoft Exam AZ-400 Solution

Configure Failed Build Notifications in Azure Pipelines

Question

You are integrating Azure Pipelines and Microsoft Teams.

You install the Azure Pipelines app in Microsoft Teams.

You have an Azure DevOps organization named Contoso that contains a project name Project1.

You subscribe to Project1 in Microsoft Teams.

You need to ensure that you only receive events about failed builds in Microsoft Teams.

What should you do first?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A

To start monitoring all pipelines in a project, use the following command inside a channel:

@azure pipelines subscribe [project url]

The project URL can be to any page within your project (except URLs to pipelines).

For example:

@azure pipelines subscribe https://dev.azure.com/myorg/myproject/

https://docs.microsoft.com/en-us/azure/devops/pipelines/integrations/microsoft-teams

The correct answer for this question is option A - From Microsoft Teams, run @azure pipelines subscribe https://dev.azure.com/Contoso/Project1.

Explanation: To ensure that you only receive events about failed builds in Microsoft Teams, you need to set up a subscription. Subscriptions enable you to specify events that you are interested in and receive notifications when those events occur.

To set up a subscription for failed builds in Azure Pipelines in Microsoft Teams, you can run the @azure pipelines subscribe command. This command creates a subscription that sends notifications about failed builds to the channel where you run the command.

Option B - From Azure Pipelines, add a Publish Build Artifacts task to Project1 is not correct because the Publish Build Artifacts task is used to publish build artifacts to a specified location, it has nothing to do with setting up a subscription for failed builds.

Option C - From Microsoft Teams, run @azure pipelines subscriptions is not correct because the correct command is @azure pipelines subscribe, not subscriptions.

Option D - From Azure Pipelines, enable continuous integration for Project1 is also not correct because enabling continuous integration does not set up a subscription for failed builds in Microsoft Teams. Continuous integration ensures that changes in source control trigger a build in Azure Pipelines, but it does not provide notifications about build results in Microsoft Teams.

Therefore, the correct answer is A - From Microsoft Teams, run @azure pipelines subscribe https://dev.azure.com/Contoso/Project1.