Microsoft certification · Exam AZ-400

AZ-400 Mock Exam Page 2

Microsoft Azure DevOps Solutions (beta)

Free AZ-400 mock exam questions 11–20, each with the answer and an explanation.

20 questions · 33 minutes · free, no sign-up

Free AZ-400 questions

11–20 of 145 free
Question 11 Choose 1
You have a Microsoft ASP.NET Core web app in Azure that is accessed worldwide. You need to run a URL ping test once every five minutes and create an alert when the web app is unavailable from specific Azure regions. The solution must minimize development time. What should you do?
Show answerHide answer

Correct answer: A Create an Azure Application Insights availability test and alert

Explanation

Explanation:
This scenario requires monitoring the availability of a global web app by performing regular synthetic tests (URL pings) from specific geographic regions and alerting on failure. The key requirements are multi-geo URL ping tests and minimizing development time. The solution must be a managed service requiring no custom code.

Correct Option:

A. Create an Azure Application Insights availability test and alert
Application Insights provides a built-in availability test feature (also called URL ping test or standard test).

It allows you to create a test that requests a URL from multiple global test locations at a defined frequency (as low as every 5 minutes).

You can select specific regions as test sources. It automatically detects failures and can trigger alerts via Azure Monitor, requiring zero development effort.

Incorrect Option:

B. Create an Azure Service Health alert for the specific regions:
Service Health tracks the status of Azure services and platform issues (e.g., outages). It does not monitor the availability or performance of your specific application endpoint from different geographies.

C. Create an Azure Monitor Availability metric and alert:
Azure Monitor itself does not have a native "Availability metric" for web apps that performs external multi-region ping tests. The platform metrics for App Service (like HTTP 5xx errors) measure internal server errors, not end-to-end availability from global client perspectives.

D. Write an Azure function and deploy the function to the specific regions:
While technically possible, this involves significant development time (writing, deploying, and maintaining code in multiple regions) and building a custom alerting mechanism. This violates the requirement to minimize development effort.

Reference:
Microsoft Learn - "Monitor availability and responsiveness of any website". This documentation details how to set up Application Insights availability tests to test your application from multiple points around the world and configure alerts, meeting all specified requirements.
Question 12 Choose 1
Your company has a project in Azure DevOps for a new web application. The company identifies security as one of the highest priorities. You need to recommend a solution to minimize the likelihood that infrastructure credentials will be leaked. What should you recommend?
Show answerHide answer

Correct answer: B Add a PowerShell task to the pipeline and run Set-AzureKeyVaultSecret

Explanation

Explanation:
This question focuses on preventing credential leakage in a CI/CD pipeline. The goal is to minimize the likelihood that sensitive infrastructure credentials (like service principal secrets or connection strings) are exposed in logs or code. The best practice is to avoid handling secrets directly in tasks, and instead use a secure secret store where the pipeline retrieves them as needed without exposing their values.

Correct Option:

D. Add Azure Key Vault references to Azure Resource Manager templates.
This method keeps secrets entirely out of the pipeline. The ARM template references a secret stored in Azure Key Vault using a special syntax (e.g., "reference": {"keyVault": {...}}).

During deployment, the Azure Resource Manager service retrieves the secret directly from Key Vault. The secret value is never passed through the pipeline tasks, logs, or parameter files, eliminating the primary leakage points.

Incorrect Option:

A. Add a Run Inline Azure PowerShell task to the pipeline:
Running inline PowerShell often involves writing secrets directly into the task script or as plaintext variables, which is a high-risk practice as they can be exposed in logs and are stored in the pipeline definition.

B. Add a PowerShell task to the pipeline and run Set-AzureKeyVaultSecret:
The Set-AzureKeyVaultSecret cmdlet is used to insert or update a secret in Key Vault. Using this in a pipeline would require having the secret value available to push, which defeats the purpose. It manages the secret in the vault but does not securely use it for deployment.

C. Add an Azure Key Vault task to the pipeline:
While this task can securely retrieve secrets from Key Vault and map them to pipeline variables, the secrets are still exposed as variables within the pipeline context. If accessed incorrectly (e.g., echoed in a log), they could be leaked. The ARM template reference method is more secure as the secret never enters the pipeline's variable space.

Reference:
Microsoft Learn - "Use Azure Key Vault to pass secure parameter value during deployment". This details the most secure pattern: using Azure Key Vault linked templates where secret values are never revealed in deployment logs, command outputs, or templates, which directly minimizes credential leakage.
Question 13 Choose 1
You are developing an application. The application source has multiple branches. You make several changes to a branch used for experimentation. You need to update the main branch to capture the changes made to the experimentation branch and override the history of the Git repository. Which Git option should you use?
Show answerHide answer

Correct answer: C MergeE1457D5D1DDCBD40AB3BF70D5D

Explanation

Explanation:
This question involves integrating changes from one Git branch into another. The critical requirement is to update the main branch while overriding the history. This points to a need for a linear project history where the experimental changes appear as if they were developed directly on main, discarding the original merge commits or branch divergence. This is a key characteristic of a rebase operation.

Correct Option:

A. Rebase
Rebase is the Git operation designed to rewrite history. It takes commits from the experimentation branch and replays them on top of the current tip of the main branch.

This results in a linear project history, making it appear as if the experimental work was done sequentially on main. It effectively overrides the previous history of the main branch with a new series of commits, fulfilling the requirement precisely.

Incorrect Option:

B. Fetch:
This command only downloads commits and references from a remote repository to your local repository. It does not integrate changes or modify your branch history.

C. Merge:
This command integrates changes from one branch into another (e.g., main), but it creates a new merge commit that ties the two histories together. It preserves the history of both branches rather than overriding it.

D. Push:
This command uploads your local commits to a remote repository. It updates the remote branch but does not itself integrate changes between different branches or alter the repository's commit history.

Reference:
Microsoft Learn - "Resolve merge conflicts in Visual Studio" (covers Git concepts). The documentation explains that rebasing rewrites the commit history by moving a branch to a new base commit, creating a linear progression, which contrasts with merging, which preserves the existing branch structure.
Question 14 Choose 1
Your company is building a new solution in Java. The company currently uses a SonarQube server to analyze the code of .NET solutions. You need to analyze and monitor the code quality of the Java solution. Which task types should you add to the build pipeline?
Show answerHide answer

Correct answer: C Maven

Explanation

Explanation:
This question asks about integrating code quality analysis into a CI/CD pipeline for a Java project, when the company already uses a SonarQube server for .NET analysis. SonarQube is a popular tool for continuous inspection of code quality, supporting multiple languages including Java. The question specifically asks which task type to add to the build pipeline to connect it to the existing SonarQube analysis platform.

Correct Option:

C. Maven
Maven is the correct answer because it's the standard build automation tool for Java projects.

SonarQube has a Maven plugin (sonar-maven-plugin) that can be added to the pom.xml file, allowing Maven to run SonarQube analysis as part of the build process.

In Azure DevOps, you would use a Maven task in the pipeline that executes goals like mvn clean verify sonar:sonar to build the Java solution and send analysis results to the SonarQube server.

Incorrect Option:

A. Octopus:
This is a deployment automation tool (Octopus Deploy), not a build tool or code analysis tool. It's used for deploying applications to various environments, not for analyzing code quality.

B. Chef:
This is an infrastructure as code and configuration management tool, used for automating server configuration. It's unrelated to Java code analysis or build pipelines for Java applications.

D. Grunt:
This is a JavaScript task runner used primarily for front-end web development (JavaScript, CSS). It's not used for Java project builds or integration with SonarQube analysis.

Reference:
Microsoft Learn - "Integrate SonarQube with Azure Pipelines" and SonarQube documentation for Java analysis. The standard approach for Java projects is to use Maven or Gradle with their respective SonarQube plugins to perform code analysis and send results to a SonarQube server.
Question 15 Choose 1
You have a project in Azure DevOps that uses an Azure Boards board and stores code in a GitHub repository. The repository contains a file named README.md. You need to ensure that README.md includes the status of the work items on the board. The solution must minimize administrative effort. What should you do first?
Show answerHide answer

Correct answer: D Select Allow anonymous users to access the status badge.

Explanation

Explanation:
This question asks about displaying Azure Boards work item status in a GitHub README.md file. The solution that minimizes administrative effort would be using Azure Boards' built-in status badge feature. The key is understanding the workflow: first you need to generate the badge, then configure its access. The question asks what you should do first to enable this functionality.

Correct Option:

A. Enable GitHub annotations for the board.
This is the correct first step. In Azure Boards, "GitHub annotations" (also called status badges) must be enabled from the board settings before you can generate badge URLs.

Once enabled, you can copy the markdown snippet containing the badge URL and paste it into your README.md file.

This is a built-in feature that requires minimal setup - no external apps or tokens needed initially.

Incorrect Option:

B. Install the Azure Boards app for GitHub:
This app helps link GitHub commits and PRs to Azure Boards work items, but doesn't create status badges for README files. It's for a different integration purpose.

C. Create a GitHub personal access token (PAT):
A PAT is not required for the basic status badge functionality. This would add unnecessary administrative overhead.

D. Select Allow anonymous users to access the status badge:
This is a configuration option that appears after you've enabled annotations and are configuring the badge settings. It's not the first step - you need to enable the feature first before you can configure its access permissions.

Reference:
Microsoft Learn - "Enable status badge (annotations) for Azure Boards". The documentation states that you first need to enable annotations from the board settings to generate badge URLs that can be embedded in markdown files like README.md.
Question 16 Choose 1
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen Your company has a project in Azure DevOps for a new web application. You need to ensure that when code is checked in, a build runs automatically. Solution: From the Continuous deployment trigger settings of the release pipeline, you enable the Pull request trigger setting. Does the meet the goal?
Show answerHide answer

Correct answer: B No

Explanation

Explanation:
This question tests understanding of CI/CD trigger types. The goal is to have a build run automatically when code is checked in. The solution proposes enabling a release pipeline trigger instead of configuring the correct build pipeline trigger. Builds and releases are different stages with separate triggers in Azure DevOps.

Correct Option:

B. No
The solution does not meet the goal because it configures the wrong pipeline type.

Release pipelines handle deployment to environments, not code compilation and testing.

The Pull request trigger in a release pipeline controls when a release is created (e.g., after a PR completes), not when a build runs on code check-in.

To automatically run a build on code check-in, you must enable the Continuous Integration (CI) trigger in the build pipeline (or YAML pipeline's build stage), not in the release pipeline.

Reference:
Microsoft Learn - "Build triggers" vs "Release triggers". The documentation clarifies that Continuous Integration triggers are configured on build pipelines to run builds on code commits, while release triggers (like pull request or continuous deployment triggers) are configured on release pipelines to control deployments.
Question 17 Choose 1
You have a multi-tier application. The front end of the application is hosted in Azure App Service. You need to identify the average load times of the application pages. What should you use?
Show answerHide answer

Correct answer: A Azure Application Insights

Explanation

Explanation:
This question focuses on monitoring end-user experience and performance for a web application. The requirement is to measure average load times of application pages, which requires capturing timing data from actual user browsers as they interact with the application. This is a specific type of client-side performance monitoring that requires specialized application performance monitoring (APM) capabilities.

Correct Option:

A. Azure Application Insights
Application Insights is a comprehensive Application Performance Management (APM) service.

When enabled for an App Service, it automatically collects browser timing data including page load performance, AJAX call durations, and user session details.

It provides ready-made reports and analytics for average page load times, performance trends, and user experience metrics directly in the Azure portal.

Incorrect Option:

B. the activity log of the App Service:
The Activity Log is an administrative log that records management plane operations (like scaling the service, changing configuration). It does not contain any application performance or user experience data.

C. the diagnostics logs of the App Service:
These logs capture server-side information like web server logs (IIS), application stdout/stderr, and detailed error messages. While useful for debugging server issues, they do not measure client-side page load times from user browsers.

D. Azure Advisor:
This is an optimization service that provides recommendations for cost optimization, security, reliability, and performance of Azure resources. It analyzes resource configuration and usage patterns but does not monitor actual application page load times or end-user experience metrics.

Reference:
Microsoft Learn - "Monitor application performance with Azure Application Insights". The documentation explains that Application Insights automatically collects browser and performance data from web pages, including page view load times, AJAX calls, and browser metrics, enabling analysis of user experience and performance trends.
Question 18 Choose 1
You use Azure DevOps processes to build and deploy code. You need to compare how much time is spent troubleshooting issues found during development and how much time is spent troubleshooting issues found in released code. Which KPI should you use?
Show answerHide answer

Correct answer: A defect escape rate

Explanation

Explanation:
This question asks about measuring the effectiveness of quality practices by comparing where issues are discovered in the development lifecycle. The goal is to track the proportion of defects caught during development versus those that escape to production. This requires a specific Key Performance Indicator (KPI) that focuses on defect discovery location and timing rather than just defect quantity or rework volume.

Correct Option:

A. defect escape rate
Defect escape rate is specifically designed to measure what percentage of defects are found after release versus during development.

It directly answers the question by comparing issues discovered post-release to the total defects found, highlighting the effectiveness of pre-release testing and quality gates.

A lower escape rate indicates more issues are caught during development, which is generally desirable as it reduces production troubleshooting time and cost.

Incorrect Option:

B. unplanned work rate:
This measures the percentage of work that wasn't part of the original plan or sprint commitment. While defects can contribute to unplanned work, this metric doesn't specifically distinguish between development-time and post-release defect troubleshooting.

C. defect rate:
This measures the overall number of defects found over time, typically per story point or line of code. It doesn't differentiate where defects were discovered (development vs. production), so it can't compare troubleshooting time between these phases.

D. rework rate:
This measures the percentage of work that needs to be redone or corrected. While rework includes fixing defects, it also encompasses other corrections and doesn't specifically track whether the rework occurred during development or after release.

Reference:
Microsoft Learn - "DevOps KPIs" and Azure DevOps documentation on metrics. The defect escape rate (or bug escape rate) is a standard DevOps KPI that measures "the percentage of defects discovered by customers (or in production) compared to the total defects discovered."
Question 19 Choose 1
Your company plans to use an agile approach to software development You need to recommend an application to provide communication between members of the development team who work in locations around the world. The application must meet the following requirements:
  • Provide the ability to isolate the members of efferent project teams into separate communication channels and to keep a history of the chats within those channels.
  • Be available on Windows 10, Mac OS, iOS, and Android operating systems.
  • Provide the ability to add external contractors and suppliers to projects.
  • Integrate directly with Azure DevOps.
What should you recommend?
Show answerHide answer

Correct answer: D Slack

Explanation

Explanation:
This question requires selecting a communication platform that supports global agile teams with specific collaboration needs. The requirements include: separate team channels with chat history, multi-platform availability (Windows, Mac, iOS, Android), ability to add external users, and direct integration with Azure DevOps. This describes a modern team messaging/chat application with integration capabilities.

Correct Option:

D. Slack
Slack is a widely used team collaboration application that meets all specified requirements.

It organizes conversations into channels (public, private, shared) for different teams/projects, maintaining complete chat history.

It offers native applications for Windows, Mac, iOS, and Android.

It supports adding external guests (contractors, suppliers) to specific channels.

It has direct Azure DevOps integration through apps/marketplace connectors to receive notifications, create work items, and link commits.

Incorrect Option:

A. Octopus:
Octopus Deploy is a release automation and deployment tool, not a team communication platform. It manages application deployments but lacks chat functionality, multi-platform client apps, and external user collaboration features.

B. Bamboo:
Bamboo is Atlassian's CI/CD server (similar to Azure Pipelines). It's a build automation tool, not a communication application. It doesn't provide chat channels, multi-platform clients, or direct team communication features.

C. Microsoft Project:
This is a project management and scheduling tool focused on Gantt charts, resource allocation, and timelines. While it has collaboration features, it is not designed for real-time team chat, doesn't provide isolated communication channels, and lacks the same level of Azure DevOps integration as modern chat platforms.

Reference:
Microsoft Learn - "Integrate with other services" and Slack's Azure DevOps integration documentation. Slack is commonly recommended for agile team collaboration with Azure DevOps integration, supporting channels, multi-platform access, and external collaboration.
Question 20 Choose 1
You are creating a dashboard in Azure Boards. You need to visualize the time from when work starts on a work item until the work item is closed. Which type of widget should you use?
Show answerHide answer

Correct answer: D lead time

Explanation

Explanation:
This question tests understanding of key agile metrics and their visualizations in Azure Boards. The requirement is to measure the time from when work starts on a work item until it is closed. This specifically describes tracking the duration a work item spends in active development states through completion. Azure Boards provides widgets to display these metrics on dashboards.

Correct Option:

D. lead time
Lead time measures the total duration from when a work item is created until it is closed (or completed). However, in Azure DevOps and common agile practice, when analyzing workflow efficiency, it's important to distinguish between the total lifecycle (creation to closure) and the active work period.

Note: There's an important distinction here. The description "from when work starts... until closed" technically describes cycle time (start of work to completion). However, in Azure Boards widgets, the Cycle Time widget actually visualizes both cycle time and lead time on a single chart. Given the exact wording and the widget names available, the most precise single widget for tracking work item duration from start to completion is the Cycle Time widget. But between the options provided, and considering the description aligns more closely with when active work begins (not when the item is first created), the intended answer is likely Cycle Time.

Let me correct: Based on standard definitions and Azure DevOps widgets:

Lead Time: Created → Done

Cycle Time: In Progress → Done

The question says "from when work starts... until closed" = Cycle Time.
Correct Answer: A. cycle time

Incorrect Option:

B. velocity:
This measures how much work (story points) a team completes per sprint, used for forecasting. It doesn't track time durations for individual work items.

C. cumulative flow:
This shows work item counts in each state over time, helping identify bottlenecks. While useful for flow analysis, it doesn't directly visualize the time duration from work start to closure for individual items.

D. lead time:
As explained, this tracks from work item creation to closure, not specifically from when work starts. If work sits in the backlog for weeks before being started, lead time would include that waiting period.

Reference:
Microsoft Learn - "Configure and monitor metrics" and "Cycle time and lead time guidance". The documentation explains that cycle time measures the time from when work starts (enters an "In Progress" or "Active" state) to when it's done, while lead time measures from work item creation to completion. The Cycle Time widget in Azure Boards displays this metric.
Full mock exam

Sit the AZ-400 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real AZ-400 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full AZ-400 mock exam
  • 65questions per mock
  • 105 mintime limit
  • 488questions in the bank
  • Newmock on every attempt