AZ-400 Exam Prep Free practice test →

Free AZ-400 Practice Questions

10 free, exam-style Microsoft Certified: DevOps Engineer Expert (AZ-400) practice questions with answers and explanations. No signup required. Work through them below, then take the full free AZ-400 practice test to study every exam domain.

Question 1

A build requires a proprietary, licensed toolchain and must connect to an on-premises SQL Server that has no public endpoint. The team wants the lowest-friction way to run this build reliably. Which agent option should they choose?

  1. A Microsoft-hosted agent with the license installed at the start of each run
  2. A Microsoft-hosted agent placed in the default Azure Pipelines pool
  3. A self-hosted agent installed on a machine inside the corporate network
  4. A Microsoft-hosted agent with a service connection to the on-premises database
Show answer & explanation

Correct answer: C - A self-hosted agent installed on a machine inside the corporate network

Question 2

A payments service cannot tolerate downtime, must roll back instantly if the new version misbehaves, and the team has budget to run a second full copy of production. Which deployment strategy BEST fits these constraints?

  1. Blue-green deployment
  2. Canary deployment
  3. Rolling deployment
  4. Deployment to a single production ring
Show answer & explanation

Correct answer: A - Blue-green deployment

Question 3

A feature is fully built, merged, and already deployed to production, but hidden. Product wants to enable it for 10% of users next week without shipping a new build. What is the BEST approach?

  1. Create a release branch and redeploy to a 10% subset of servers
  2. Configure a canary deployment that redeploys the artifact to 10% of instances
  3. Use a deployment slot and swap 10% of traffic into the new slot
  4. Use a feature flag to progressively enable the feature for 10% of users
Show answer & explanation

Correct answer: D - Use a feature flag to progressively enable the feature for 10% of users

Question 4

A multi-stage YAML pipeline defines: stage Build (no dependsOn); stage Test with dependsOn: Build; stage DeployStaging with dependsOn: Test; stage SecurityScan with dependsOn: Build. Assuming all stages succeed, which statement about execution is correct?

  1. Test and SecurityScan both wait for DeployStaging to finish
  2. SecurityScan and Test can run in parallel after Build completes
  3. SecurityScan runs only after DeployStaging succeeds
  4. All four stages run in parallel because YAML stages are independent
Show answer & explanation

Correct answer: B - SecurityScan and Test can run in parallel after Build completes

Question 5

A team must run the same test job against Ubuntu, Windows, and macOS in a single job definition, with all three running at the same time. Which YAML construct achieves this most efficiently?

  1. Three separate jobs each with a different pool, chained by dependsOn
  2. A single job with a condition expression selecting each operating system
  3. A matrix strategy that fans the job out across the three images
  4. A step template invoked three times inside one job
Show answer & explanation

Correct answer: C - A matrix strategy that fans the job out across the three images

Question 6

An organization provisions infrastructure across both Azure and AWS and requires an explicit, stored state file to track and reconcile resources. Which infrastructure-as-code technology BEST meets this requirement?

  1. Bicep
  2. Terraform
  3. Azure Resource Manager (ARM) templates
  4. PowerShell Desired State Configuration
Show answer & explanation

Correct answer: B - Terraform

Question 7

Developers need to spin up their own pre-approved, governed test environments on demand, without filing a ticket, while the platform team keeps control over what can be deployed and to which subscription. Which Azure capability is designed for this?

  1. Azure Deployment Environments
  2. Azure Automation State Configuration
  3. A shared variable group scoped to each developer
  4. A self-hosted agent pool per developer
Show answer & explanation

Correct answer: A - Azure Deployment Environments

Question 8

A release must automatically pause and NOT proceed to production while an Azure Monitor alert for the target service is firing, with no human required to click anything. What should be configured?

  1. A pre-deployment manual approval on the production stage
  2. A branch policy requiring build validation before merge
  3. A scheduled trigger that delays the production stage
  4. A pre-deployment gate that queries the Azure Monitor alert state
Show answer & explanation

Correct answer: D - A pre-deployment gate that queries the Azure Monitor alert state

Question 9

A company wants all npm packages - both its internal packages and public ones from the npm registry - to be consumed through a single Azure Artifacts feed so public packages are cached and access is centrally controlled. What should be configured on the feed?

  1. A separate release view for each public package
  2. A build validation policy on the feed
  3. An upstream source pointing to the public npm registry
  4. A service connection to npmjs.com
Show answer & explanation

Correct answer: C - An upstream source pointing to the public npm registry

Question 10

An Azure App Service deployment must go live with zero downtime, and the new build should be warmed up before it starts receiving production traffic. Which approach accomplishes this?

  1. Deploy directly to production and enable Always On
  2. Deploy to a staging slot, warm it up, then swap it into production
  3. Deploy using a canary that shifts 10% of traffic per minute
  4. Deploy to a self-hosted agent that mirrors production
Show answer & explanation

Correct answer: B - Deploy to a staging slot, warm it up, then swap it into production

What's on the AZ-400 exam

The Microsoft Certified: DevOps Engineer Expert (AZ-400) exam is organized into 5 knowledge domains. These free practice questions are drawn from across them so you can see where you're strong and where to study:

  1. Design and implement processes and communications (10-15%)
  2. Design and implement a source control strategy (10-15%)
  3. Design and implement build and release pipelines (50-55%)
  4. Develop a security and compliance plan (10-15%)
  5. Implement an instrumentation strategy (5-10%)

Ready for the real thing?

Practice hundreds more AZ-400 questions with instant scoring, weak-area drills, and full exam simulations.

Start the free practice test See pricing