This is the free Microsoft AZ-400 practice question bank —
270 of 531 total questions, each with a full explanation, free to
read with no signup required. Updated 2026-04-24.
Every answer is verified against official Microsoft documentation —
see our methodology.
Question 1
SIMULATION
-
You need to configure a virtual machine template in a DevTest Labs environment named az400-123456789-dtl1. The operating system must be based on Windows Server 2016 Datacenter. Virtual machines created from the DevTest Lab must include the Selenium tool and the Google Chrome browser.
To complete this task, sign in to the Microsoft Azure portal.
Show Answer
Correct Answer: Open DevTest Labs → az400-123456789-dtl1
Create a new VM using Windows Server 2016 Datacenter
Add the Selenium artifact (includes Google Chrome)
Create the VM
Capture the VM as a custom image/template
Use the template for future lab VMs
Explanation: Create a DevTest Lab VM with the required OS, add the Selenium artifact which installs Chrome, then capture the configured VM as a reusable template so all future lab VMs include Selenium and Chrome.
Question 2
SIMULATION
-
You need to create a new team dashboard named Dashboard1 for the default project team of Project1.
The dashboard must display the members of the team.
Show Answer
Correct Answer: Create a new dashboard named **Dashboard1**
Set dashboard type to **Team Dashboard** for **Project1** default team
Add the **Team Members** widget to the dashboard
Explanation: First, create a new team dashboard named Dashboard1 and associate it with the default team of Project1. Then, to display the members of the team, add the **Team Members** widget to the dashboard; no auto-refresh configuration is required for this requirement.
Question 3
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.
You need to use an Azure Pipelines pipeline to build and test an app and test the database of the app. The solution must meet the following requirements.
• The test stages must be run in parallel.
• The Publish_Test_Results stage must always be run.
• The test stages must be run after successful completion of the build stage.
• The Publish_Test_Results stage must be run after completion of all the test stages.
Solution: You include the following elements in the YAML definition of the pipeline.
Does this meet the goal?
A. Yes
B. No
Show Answer
Correct Answer: A
Explanation: The test stages both depend only on the build stage and not on each other, so they run in parallel after a successful build. The Publish_Test_Results stage uses dependsOn to wait for all test stages and a condition such as always() ensures it runs regardless of prior success or failure. Therefore all stated requirements are satisfied.
Question 4
SIMULATION
-
For Project1, you need to create a project wiki named Wiki1 that uses the Mermaid syntax to render a diagram.
A sample of the desired output is stored in C : \Resources\TCPHandshake.png.
Show Answer
Correct Answer: Create a project wiki named **Wiki1** in Azure DevOps.
Add a wiki page and insert a Mermaid diagram using a mermaid code block.
Example:
```mermaid
sequenceDiagram
Client->>Server: SYN
Server->>Client: SYN-ACK
Client->>Server: ACK
```
Explanation: Navigate to **Project → Wiki → Create project wiki** to create Wiki1. Edit a wiki page and embed the diagram using a Mermaid code block (or Insert Mermaid Diagram). The Mermaid syntax renders the diagram to match the required TCP handshake image.
Question 5
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.
You need to use an Azure Pipelines pipeline to build and test an app and test the database of the app. The solution must meet the following requirements.
• The test stages must be run in parallel.
• The Publish_Test_Results stage must always be run.
• The test stages must be run after successful completion of the build stage.
• The Publish_Test_Results stage must be run after completion of all the test stages.
Solution: You include the following elements in the YAML definition of the pipeline.
Does this meet the goal?
A. Yes
B. No
Show Answer
Correct Answer: B
Explanation: The solution does not meet the goals because the test stages are configured without a dependency on the build stage (e.g., dependsOn: []). As a result, the test stages can start in parallel with the build instead of after its successful completion, violating the requirement that tests run only after the build succeeds.
Question 6
SIMULATION
-
For the RG1lod12345678 resource group, you need to create an action group named DevOpsAG that can be triggered in any region by using Alerts.
The action group must email two users named
and
and notify members of the Owner role for the resource.
Use only the common alert schema for notifying the resource owners.
Show Answer
Correct Answer: Create an Azure Monitor action group with the following settings:
Name: DevOpsAG
Resource group: RG1lod12345678
Region: Global
Notifications:
- Email/SMS/Push/Voice → Email user1
- Email/SMS/Push/Voice → Email user2
- Email Azure Resource Manager Role → Owner (Common alert schema: Enabled)
Explanation: The requirement is to create an action group usable by alerts in any region, which requires the Global region. Two individual email notifications must be added for the specified users. To notify all resource owners, the Email Azure Resource Manager Role notification type is used with the Owner role selected, and the common alert schema must be enabled for that role-based notification.
Question 7
SIMULATION
-
Initialize the default main branch, if it does not exist already.
In Project1, you need to create a new Azure Pipelines YAML pipeline by using the ASP.NET template.
The pipeline must use Azure Repos as the hosting platform and must be created in a new branch named azure-pipelines.
Show Answer
Correct Answer: 1. In Project1, go to Repos → Branches and initialize the default **main** branch (if not already present).
2. Create a new branch named **azure-pipelines** from main.
3. Switch to the **azure-pipelines** branch.
4. Go to Pipelines → New pipeline.
5. Select **Azure Repos Git** as the source.
6. Select the Project1 repository.
7. Choose the **ASP.NET** YAML template.
8. Save and run the pipeline, committing the YAML to the **azure-pipelines** branch.
Explanation: The task requires initializing the default main branch, creating a new branch named azure-pipelines, and creating an Azure Pipelines YAML pipeline using the ASP.NET template hosted in Azure Repos. The pipeline YAML must be committed to the newly created branch.
Question 8
HOTSPOT
-
You have an app named App1 that is built and deployed by using containers.
The Dockerfile for App1 has the following definition.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: Yes
No
Yes
Explanation: The app targets ASP.NET Core (dotnet SDK image and ASP.NET-style ports). The build and publish commands explicitly use the Release configuration. Multiple FROM statements (base, build, publish, final) indicate a Docker multi-stage build.
Question 9
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.
You need to use an Azure Pipelines pipeline to test an app. The solution meet the following requirements:
• The pipeline must fail if any tests fail.
• The test results must be published to the pipeline.
• The test for every pipeline run must be triggered unless the pipeline is cancelled.
Solution: You include the following elements in the YAML definition of the pipeline.
Does this meet the goal?
A. Yes
B. No
Show Answer
Correct Answer: B
Explanation: The goal requires that the pipeline fails when any tests fail and that test results are always published for every run unless the pipeline is cancelled. The provided YAML elements do not ensure this because the test publishing task must explicitly be configured to fail the pipeline on failed tests (for example, failTaskOnFailedTests: true) and to run even when tests fail (for example, using condition: succeededOrFailed()). Without these settings, the requirements are not fully met.
Question 10
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.
You need to use an Azure Pipelines pipeline to build and test an app and test the database of the app. The solution must meet the following requirements.
• The test stages must be run in parallel.
• The Publish_Test_Results stage must always be run.
• The test stages must be run after successful completion of the build stage.
• The Publish_Test_Results stage must be run after completion of all the test stages.
Solution: You include the following elements in the YAML definition of the pipeline.
Does this meet the goal?
A. Yes
B. No
Show Answer
Correct Answer: B
Explanation: The YAML does not guarantee that Publish_Test_Results always runs after all test stages. To meet the requirements, the publish stage must explicitly depend on each test stage and use condition: always(). As written, the configuration either groups tests in a single stage or omits the always() condition, so it does not fully satisfy the stated goals.
$19
Get all 531 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.