Microsoft

AZ-400 Free Practice Questions

This is the free Microsoft AZ-400 practice question bank — 280 of 541 total questions, each with a full explanation, free to read with no signup required. Updated 2026-10-13.

Every answer is verified against official Microsoft documentation — see our methodology.

Question 1

You manage a project by using Azure Boards. You manage the project code by using GitHub. You have three work items that have IDs of 456, 457, and 458. You need to create a pull request that will be linked to all the work items. The solution must set the state of work item 456 to done. What should you add to the commit message?

A. Done #456, #457, #458
B. Fixes #456, #457, #458
C. Fixes #AB456, #A8457, #A8458
D. #AB456, #AB457, #AB458 Completed #AB456
Show Answer
Correct Answer: C
Explanation:
The intended choice is C: use the `Fixes` keyword so work item 456 is transitioned when the pull request is completed, and reference all three work items. The Azure Boards/GitHub syntax is `AB#<ID>`; thus the correctly formatted message would be `Fixes AB#456, AB#457, AB#458`. Option C appears to have a formatting typo in those references.

Question 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. 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?

Illustration for AZ-400 question 1
A. Yes
B. No
Show Answer
Correct Answer: A
Explanation:
Test_App and Test_Database both depend on Build_App and have no dependency on each other, so they can run in parallel after a successful build. Publish_Test_Results depends on both test stages, so it waits for them to complete; its always() condition ensures it runs regardless of their outcomes.

Question 1

SIMULATION - Navigate to https://dev.azure.com, select Start Free, and specify the following credentials: • User: • Password: 0123456789 Use the default setting to sign up for Azure DevOps and create an Azure DevOps organization. Once the organization is created, create a private project named Project1. You need to add an external user that has an email address of as a stakeholder of the User1-12345678 Azure DevOps organization. The user must be added to the most restrictive Azure DevOps group. To complete this task, sign in to the Azure DevOps portal as .

Show Answer
Correct Answer: Organization Settings → Users → Add users User: specified external email Access level: Stakeholder Project: Project1 (or default) Azure DevOps Groups: Project Readers (most restrictive) Add
Explanation:
Add the external user at Stakeholder access and place them in the lowest-privilege Azure DevOps group (Readers) to satisfy the requirement for the most restrictive group.

Question 1

SIMULATION For Project1, you need to ensure that artifacts, symbols, and attachments are retained for 60 days.

Show Answer
Correct Answer: In Project1, go to Project settings → Pipelines → Settings. Under Retention policy, set “Days to keep artifacts, symbols, and attachments” to 60, then save.
Explanation:
This project-level pipeline retention setting controls how long those items are kept.

Question 2

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: In the DevTest Lab, create a custom VM from Windows Server 2016 Datacenter, add the Selenium and Google Chrome artifacts, then create a custom image/formula from that configured VM to use as the lab template.
Explanation:
DevTest Labs templates are created from configured lab VMs or formulas. Installing the required artifacts before capturing ensures all future VMs include Selenium and Chrome.

Question 2

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?

Illustration for AZ-400 question 2
A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
No. Setting `dependsOn: []` for `Test_App` and `Test_Database` removes their dependency on `Build_App`, so they can start in parallel with the build instead of waiting for it to complete successfully.

Question 2

SIMULATION In Project1, you need to create a variable group named varGroup1 that will contain the following variables: serverName: server1 dbName: db1

Show Answer
Correct Answer: In Project1, go to Pipelines → Library → + Variable group. Name the group `varGroup1`. Add `serverName` = `server1` and `dbName` = `db1`. Select Save.
Explanation:
Saving creates the variable group in Project1 with both requested variables.

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 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?

Illustration for AZ-400 question 3
A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
No. The task publishes the test results, and `condition: succeededOrFailed()` lets it run after earlier steps fail while preventing it from running after cancellation. However, `failTaskOnFailedTests` is not set to `true`, so failed tests will not necessarily fail the pipeline.

Question 3

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 team dashboard: Dashboard1 Team: Default team of Project1 Add Team Members widget configured for the default team
Explanation:
Create a new team dashboard with the specified name for Project1's default team, then add the Team Members widget so the dashboard displays the team's members. Auto-refresh is not required unless explicitly requested.

Question 4

SIMULATION - Initialize the default main branch, if it does not exist already. In the User1-12345678 organization, you need to install the Microsoft Security DevOps extension. Next, create a new starter pipeline named starter1 that will use the following starter code. Ensure that starter1 includes a task that executes the extension and uses the following inputs: • Command: run • Policy: azuredevops • Publish: true Save the pipeline to a new branch named starter.

Illustration for AZ-400 question 4
Show Answer
Correct Answer: 1. If the repository is empty, initialize it in Repos → Files to create the default `main` branch. 2. In organization `User1-12345678`, install **Microsoft Security DevOps** from the Azure DevOps Marketplace. 3. Create a **Starter pipeline** named `starter1` with this YAML: ```yaml trigger: - starter pool: vmImage: 'windows-latest' steps: - task: MicrosoftSecurityDevOps@1 inputs: command: 'run' policy: 'azuredevops' publish: true ``` 4. Save the pipeline to a **new branch** named `starter`.
Explanation:
The YAML retains the supplied trigger and agent image, and adds the extension task with the required inputs. Saving to the new `starter` branch matches the pipeline trigger.

$19

Get all 541 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.