AZ-400Expert level

Free AZ-400 Practice Questions

20 scenario questions covering every AZ-400 domain — processes and communications, source control strategy, build/release pipelines, security and compliance, and instrumentation. Pick an answer, then reveal the explanation to check your reasoning.

20 questions~30 minUpdated July 2026

AZ-400 weights its five domains unevenly — build and release pipelines alone is 50–55% of the exam — so the questions below follow that same weighting: ten out of twenty on pipelines, and only two or three each on the smaller domains. That distribution mirrors the real exam more closely than a flat 4-per-domain split would.

Read the scenario, pick an answer, then click Reveal answer to check your reasoning against the explanation — not just the correct letter. A wrong answer is a signal to review that domain in the full AZ-400 practice exam rather than moving on.

Question distribution by domain

3

Process

3

Source Ctrl

10

Pipelines

2

Security

2

Instrument.

Processes & Communications

Q1–3 · 10–15% of exam
Question 1Work-Item Traceability

A team splits work between a GitHub repository and Azure Boards. Leadership wants every commit and pull request automatically linked to the Azure Boards work item it addresses, without developers manually pasting links.

What should you configure?

A.Integration between Azure Boards and the GitHub repository, enabling automatic linking via work item mentions in commits and PRs
B.A GitHub Issues webhook posting a message to a Teams channel
C.A branch policy requiring a comment on every pull request
D.A Mermaid diagram in the wiki documenting the intended process
Reveal answer & explanation

Correct: A. Azure Boards-GitHub integration natively links commits, PRs, and branches to work items referenced by ID (e.g. "AB#123") — no manual pasting required. A Teams webhook only notifies; it doesn't create traceability links. A comment-required policy doesn't enforce linking. A wiki diagram documents intent but automates nothing.

Question 2Flow Metrics vs. Raw Velocity

Management asks for a dashboard showing how long, on average, it takes a change to go from the first commit to production deployment — not how many items the team completes per sprint.

Which metric should the dashboard be built around?

A.Lead time
B.Story point velocity
C.Sprint burndown
D.Number of open pull requests
Reveal answer & explanation

Correct: A. Lead time measures the full span from work starting (first commit) to delivery — exactly what's being asked. Velocity measures throughput of completed story points per sprint, not elapsed time for a single change. Burndown tracks remaining work within a sprint. Open PR count is a snapshot, not a time-based flow metric.

Question 3Teams Integration via Webhook

A team wants a message posted to a specific Microsoft Teams channel every time a pipeline run fails, and no native Azure Pipelines-Teams connector covers the exact custom format they want.

What should you configure?

A.A webhook from the pipeline posting a formatted message to a Teams incoming webhook URL
B.A Microsoft Entra conditional access policy scoped to the pipeline
C.An Azure Boards work item automation rule
D.A branch protection rule requiring Teams channel approval
Reveal answer & explanation

Correct: A. A webhook is the general-purpose integration mechanism for pushing custom-formatted events to external systems like Teams when no built-in connector matches the required format. Conditional access governs sign-in behavior, unrelated to pipeline notifications. A work item automation rule operates on Boards items, not pipeline events. Branch protection rules gate merges, not notifications.

Source Control Strategy

Q4–6 · 10–15% of exam
Question 4Branch Strategy for a Fast-Moving Team

A team already merges short-lived feature branches into main multiple times a day via pull request, with no long-lived parallel branches. They ask for a branch strategy recommendation that keeps this pattern without adding new branch types.

What should you recommend?

A.Continue with trunk-based development using short-lived feature branches merged via PR
B.Adopt Gitflow with permanent develop, release, and hotfix branches
C.Introduce a long-lived staging branch that mirrors main
D.Require every feature to live in its own permanent branch until the next major release
Reveal answer & explanation

Correct: A. Trunk-based development already describes what the team is doing — short-lived branches merged frequently into a single trunk — and needs no new structure. Gitflow adds permanent branch types the team explicitly doesn't need. A long-lived staging branch and permanent per-feature branches both reintroduce the long-lived-branch overhead trunk-based development is designed to avoid.

Question 5Git LFS for Large Binary Assets

A game development team keeps committing multi-hundred-megabyte texture and audio files directly into their Git repository, causing clone times to balloon for every new team member.

What should you implement?

A.Git Large File Storage (LFS), storing large files as pointers with content hosted separately
B.Scalar, to optimize sparse-checkout performance
C.A shallow clone policy enforced via branch protection
D.A separate release branch for each asset version
Reveal answer & explanation

Correct: A. Git LFS is purpose-built for large individual files — it replaces the file content in Git with a lightweight pointer, keeping repository size and clone time manageable. Scalar solves large-repository (many files, deep history) performance, not large individual files — a different scaling problem. A shallow clone policy isn't a real enforceable Git feature via branch protection. A release branch per asset version doesn't address the underlying large-file storage problem.

Question 6Removing a Leaked Secret from History

A developer accidentally committed an API key to a repository three commits ago. The commit has already been pushed and pulled by other team members. The key must be fully removed from the repository's history, not just the current file state.

What should you do?

A.Rewrite history to remove the secret from all commits (e.g. via git filter-repo), force-push, and have the team re-clone or reset
B.Delete the file in a new commit so it no longer appears in the current working tree
C.Add the file to .gitignore going forward
D.Rotate the leaked key but leave the repository history unchanged
Reveal answer & explanation

Correct: A. Removing data from source control history requires rewriting the commits that contain it (via a history-rewriting tool) and force-pushing, followed by every clone being reset — a new commit or .gitignore entry leaves the secret fully intact in prior commits' history. Rotating the key is a necessary follow-up but does not itself remove the secret from the repository, which the requirement explicitly calls for.

Over half the questions in this bank cover Build & Release Pipelines

Ten questions coming up — the domain that decides most AZ-400 outcomes.

Build & Release Pipelines

Q7–16 · 50–55% of exam — the largest domain
Question 7SemVer vs. CalVer for a Public Package

A team publishes a shared internal library that other teams' applications depend on directly. Consumers need to know, from the version number alone, whether upgrading might break their code.

What versioning strategy should you adopt?

A.Semantic versioning (SemVer), incrementing the major version on breaking changes
B.Date-based versioning (CalVer), tagging each release with its publish date
C.A single incrementing build number with no semantic meaning
D.Versioning the package identically to the pipeline's build ID
Reveal answer & explanation

Correct: A. SemVer's major.minor.patch structure explicitly communicates breaking vs. compatible changes to consumers, which is exactly the stated need. CalVer communicates release cadence, not compatibility. A bare incrementing build number and reusing the pipeline's build ID both carry no compatibility semantics at all — consumers would have no way to infer breaking-change risk.

Question 8Feed Views for Package Promotion

A team wants developers to be able to publish packages freely to a working feed, but only packages that pass an automated quality gate should ever reach the feed that production applications actually consume from.

What should you configure in Azure Artifacts?

A.Separate local and release feed views, promoting a package version to the release view only after it passes the quality gate
B.A single feed with a naming convention distinguishing tested from untested packages
C.Branch policies on the source repository requiring a passing build before merge
D.A retention policy that deletes packages older than 30 days
Reveal answer & explanation

Correct: A. Feed views let a package version be published freely to a local/working view while only promoting vetted versions to a release view that consumers point at — exactly the gate described. A naming convention is a manual, unenforced signal. Branch policies gate code merges, not which package versions reach a feed. A retention policy manages storage, not quality gating.

Question 9Multi-Stage YAML with Parallel Jobs

A pipeline currently runs unit tests, integration tests, and a linter sequentially in a single stage, taking 40 minutes. None of these three tasks depend on each other's output.

What should you change to reduce pipeline duration?

A.Run the three independent jobs in parallel within the stage, using multiple agents
B.Split each task into its own separate pipeline triggered manually
C.Move all three tasks into a single script step to reduce overhead
D.Reduce the frequency of pipeline runs to once per day
Reveal answer & explanation

Correct: A. Jobs with no dependency on each other's output can run in parallel across multiple agents within the same stage, directly cutting wall-clock time. Splitting into separate manually-triggered pipelines adds coordination overhead without automatic parallelism. Merging into a single script step forces sequential execution. Reducing run frequency doesn't address per-run duration and delays feedback.

Question 10Reusable YAML Templates

Twelve different microservice repositories each define nearly identical build-and-test YAML steps, and a required security-scan step must now be added to all twelve without editing each pipeline file individually going forward.

What should you implement?

A.A shared YAML template containing the common steps, referenced by each pipeline, with the security-scan step added to the template once
B.A copy-paste of the updated steps into each of the twelve pipeline files
C.A single monorepo pipeline covering all twelve services
D.A scheduled task that periodically diffs the twelve pipeline files for drift
Reveal answer & explanation

Correct: A. A shared YAML template centralizes common steps so a single edit (adding the scan step) propagates to every referencing pipeline. Copy-pasting into twelve files reintroduces the exact duplication problem being solved. Merging into one monorepo pipeline is a disproportionate restructuring not required by the stated problem. A drift-detection task finds the problem after the fact rather than preventing it.

Question 11Hybrid Pipeline with Self-Hosted Agents

A pipeline must run its build stage on Microsoft-hosted agents but deploy to an on-premises server that has no direct internet-inbound connectivity and requires specific proprietary software installed on the deployment machine.

What should you configure?

A.A self-hosted agent installed on or reachable from the on-premises environment for the deployment stage, alongside Microsoft-hosted agents for the build stage
B.Microsoft-hosted agents for both stages, using a VPN gateway for the deployment step
C.A single self-hosted agent for both the build and deployment stages
D.Azure Deployment Environments to host the on-premises server virtually
Reveal answer & explanation

Correct: A. A hybrid pipeline mixes Microsoft-hosted agents (for stages with no special environment needs, like build) with a self-hosted agent placed where it can reach the on-prem, non-internet-facing target and has the required proprietary software installed. Microsoft-hosted agents alone cannot reach an isolated on-prem server regardless of VPN, since the hosted agent pool itself isn't deployed there. Using self-hosted for both stages is unnecessary when the build stage has no special requirement. Azure Deployment Environments provision on-demand Azure dev/test environments — not a way to virtualize an existing on-prem server.

Question 12Canary vs. Ring-Based vs. Blue-Green

A team wants any regression in a new release caught by monitoring a small percentage of live production traffic before the release reaches the rest of users, with the ability to scale up exposure gradually based on observed metrics.

Which deployment strategy fits best?

A.Canary deployment
B.Blue-green deployment
C.A full rollback-only deployment with no staged exposure
D.A single-environment deployment with no monitoring gate
Reveal answer & explanation

Correct: A. Canary deployment is specifically designed to expose a new version to a small percentage of live traffic and scale exposure based on observed metrics — exactly the requirement. Blue-green swaps all traffic to the new environment at once, which doesn't provide graduated, percentage-based exposure. The other two options describe having no staged rollout mechanism at all, which is the opposite of what's being asked for.

Question 13Feature Flags vs. Deployment Rings

A new feature has already been deployed to 100% of production servers as part of a scheduled release, but the team wants to enable it for only 2% of end users initially and turn it off instantly if problems arise, without a new deployment either way.

What should you use to control this?

A.A feature flag managed through Azure App Configuration Feature Manager
B.A deployment ring limiting which servers receive the build
C.A canary release routing 2% of infrastructure traffic to a separate deployment slot
D.A blue-green swap reverting to the previous environment
Reveal answer & explanation

Correct: A. The code is already deployed everywhere — the requirement is purely about which users experience the feature, and toggling that instantly without a new deployment. A feature flag does exactly that: it gates a code path already present in the build. Deployment rings and canary releases both control which servers/infrastructure receive a build, not which end users see a feature within an already-deployed build. A blue-green swap would require redeploying to the previous environment, which contradicts "without a new deployment."

Question 14Hotfix Path Plan

A critical production bug is discovered that must be fixed and deployed within hours, but the team's normal release pipeline includes a full regression suite that takes six hours to run and is required for standard releases.

What should the team's hotfix path plan include?

A.An expedited pipeline path with a reduced, targeted test suite scoped to the affected area, reviewed and approved through an accelerated but still-gated process
B.Disabling all pipeline gates temporarily so any commit can deploy immediately
C.Waiting for the next scheduled full regression run before deploying the fix
D.Deploying the fix directly to production by bypassing the pipeline entirely
Reveal answer & explanation

Correct: A. A hotfix path plan is precisely an alternate, faster route through the pipeline — reduced scope testing focused on the affected area, still gated by review/approval — that balances urgency against risk. Disabling all gates removes necessary safeguards entirely. Waiting for the next full run defeats the "within hours" requirement. Bypassing the pipeline entirely removes traceability, testing, and approval altogether, which a hotfix path plan is specifically designed to avoid while still being fast.

Question 15Desired State Configuration with Bicep

A team wants their Azure infrastructure defined declaratively in source control, so that the actual deployed state can always be reconciled against a version-controlled definition, and changes go through the same pipeline and review process as application code.

What approach should they adopt?

A.Define infrastructure as code using Bicep templates, stored in the same source control and deployed through the pipeline
B.Manually configure resources through the Azure portal and document the steps in a wiki
C.Use PowerShell scripts run ad hoc by whichever engineer is on call
D.Rely on Azure Advisor recommendations to keep infrastructure current
Reveal answer & explanation

Correct: A. Bicep (or ARM) templates in source control, deployed via pipeline, are exactly what "declarative, version-controlled, pipeline-reviewed infrastructure" describes — the core of an infrastructure-as-code strategy. Manual portal configuration with wiki documentation isn't declarative or version-controlled and drifts easily. Ad hoc scripts run by whoever is on call lack the consistency and review process required. Azure Advisor gives recommendations; it does not define or enforce a desired state.

Question 16Migrating Classic to YAML Pipelines

An organization still runs several release pipelines configured through the classic (UI-based) editor. Microsoft has signaled classic pipelines are being phased out, and the team wants version-controlled, code-reviewable pipeline definitions going forward.

What should the team do?

A.Migrate the classic pipelines to YAML pipeline definitions stored in source control
B.Leave the classic pipelines unchanged since they still function correctly today
C.Export the classic pipeline configuration to a PDF for documentation purposes
D.Recreate the pipelines as manual runbooks executed by an operator
Reveal answer & explanation

Correct: A. Migrating classic pipelines to YAML gives version-controlled, diffable, code-reviewable pipeline definitions and gets ahead of the deprecation of the classic editor — exactly what "maintain pipelines" as an AZ-400 skill covers. Leaving them unchanged ignores both the stated deprecation risk and the version-control requirement. A PDF export documents but doesn't make the pipeline itself version-controlled or reviewable. Manual runbooks remove automation entirely, which is a regression, not a migration.

Security & Compliance

Q17–18 · 10–15% of exam
Question 17Workload Identity Federation for GitHub Actions

A GitHub Actions workflow currently authenticates to Azure using a service principal with a client secret stored as a GitHub secret. The security team wants to eliminate any long-lived credential the workflow depends on.

What should you implement?

A.Workload identity federation (OIDC), issuing the workflow a short-lived federated token instead of a stored client secret
B.A longer, more complex client secret rotated every 90 days
C.A personal access token belonging to a specific engineer
D.Storing the existing client secret in Key Vault instead of GitHub secrets
Reveal answer & explanation

Correct: A. Workload identity federation lets GitHub Actions authenticate to Azure via a short-lived, federated token with no long-lived secret stored anywhere — the secretless option external CI/CD needs. A longer rotated secret is still a long-lived credential, just rotated. A personal access token ties automation to an individual's identity and is also a stored, long-lived credential. Moving the same client secret into Key Vault relocates it but doesn't eliminate the credential itself.

Question 18Dependabot vs. CodeQL vs. Defender for Cloud DevOps Security

Security leadership wants one consolidated view showing exposed secrets, misconfigurations, and open-source vulnerability risk across both the organization's GitHub repositories and Azure DevOps projects, rather than checking each tool's own dashboard separately.

What should you configure?

A.Microsoft Defender for Cloud DevOps Security, connecting both GitHub and Azure DevOps
B.Dependabot alerts enabled individually on each GitHub repository
C.CodeQL scanning configured only on the Azure DevOps projects
D.A shared spreadsheet manually aggregating each tool's findings weekly
Reveal answer & explanation

Correct: A. Defender for Cloud DevOps Security is the unified posture layer purpose-built to connect both GitHub and Azure DevOps into a single Defender for Cloud view covering secrets, misconfigurations, and open-source risk — exactly the consolidated view requested. Dependabot alone only covers dependency vulnerabilities on GitHub. CodeQL performs code scanning, not secrets/misconfiguration posture, and doesn't cover GitHub in this option. A manually aggregated spreadsheet is not a consolidated, automated view.

Instrumentation

Q19–20 · 5–10% of exam
Question 19Distributed Tracing Across Services

An application composed of three microservices is experiencing intermittent slow responses, but it's unclear which of the three services is responsible for the added latency in any given request.

What should you configure to diagnose this?

A.Azure Monitor Application Insights distributed tracing across all three services
B.A single Azure Monitor Log Analytics workspace with no instrumentation added
C.Increased pipeline build agent capacity
D.A stricter NSG rule between the three services' subnets
Reveal answer & explanation

Correct: A. Application Insights distributed tracing follows a single request as it flows across multiple services, pinpointing exactly which hop introduces latency — precisely what's needed here. A Log Analytics workspace with no telemetry configured to feed it has nothing to analyze. Build agent capacity is unrelated to runtime request latency. An NSG rule is a network security control, not a diagnostic tool for latency.

Question 20Basic KQL for Failed Requests

A team needs to quickly find every failed HTTP request logged to Azure Monitor Logs in the last hour for a specific application, to include in an incident report.

What should you use?

A.A basic Kusto Query Language (KQL) query filtering the requests table by result code and time range
B.Manually scrolling through the Azure portal's activity log
C.A pipeline YAML variable capturing failed requests
D.A branch policy blocking further deployments until the issue is resolved
Reveal answer & explanation

Correct: A. A basic KQL query against the requests table, filtered by failure result code and a time window, is the direct way to interrogate logs stored in Azure Monitor Logs — exactly the AZ-400 "interrogate logs using basic KQL" skill. The Activity Log records management operations (like resource changes), not application request telemetry. A pipeline YAML variable is a build-time construct, unrelated to querying runtime logs. A branch policy prevents deployments; it doesn't retrieve log data for an incident report.

Want 480 More AZ-400 Questions?

Full coverage of all five domains, weighted the same way the real exam is, calibrated to the same design-decision difficulty. Start with 40 free — no card required.

Start Free AZ-400 Practice →