Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Microsoft Designing and Implementing Microsoft DevOps Solutions AZ-400 Exam Questions

Last updated: · 12 practice questions with answers and explanations

Page: 1 / 45 Total 661 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Design and implement processes and communications

Skill tested: Designs traceability links from work items through commits to deployed releases.

A company uses Azure Boards for planning, Azure Repos for two application repositories, and Azure Pipelines for deployment. Auditors must be able to trace a production release back to the user stories and defects it delivered, including changes contributed through pull requests. Teams currently enter release notes manually, and several commits lack work-item references. The company wants a process that creates durable links without relying on manual release-note reconciliation. What should the company implement?

Correct Answer: B. Require developers to include work-item IDs in commit messages and use Azure Pipelines deployment records associated with the commits and build artifacts.
Explanation:

Work-item references in commit messages establish links between Azure Boards items and source changes. Azure Pipelines records build and deployment history, allowing teams to follow the source and artifacts through a release. A spreadsheet is a manual snapshot that can become stale and does not create durable links. Separate projects duplicate planning data, while branch names alone do not reliably link individual work items, commits, and deployment records.

Question 2

New Single answer

Topic: Design and implement a source control strategy

Skill tested: Selects branch policies that require validated pull requests before protected-branch updates.

A product team deploys from the main branch several times each day. Developers must collaborate through pull requests, and every change must pass a successful build before it can enter main. The team also wants at least one peer review. Developers must not bypass these requirements, but release automation needs to update version metadata in main. Which configuration best satisfies the requirements while retaining an auditable exception for automation?

Correct Answer: C. Protect main with required reviewers and a build-validation policy; grant the automation identity a narrowly scoped policy-bypass permission and audit its use.
Explanation:

Required reviewers and build validation enforce the normal pull-request path. A narrowly scoped identity exception supports the stated automation need without granting every developer the ability to bypass controls; bypass activity can be audited. Completing before build validation finishes defeats the quality gate. Direct pushes and broad bypass permissions undermine the requested protected-branch workflow.

Question 3

New Multiple answers

Topic: Design and implement build and release pipelines

Skill tested: Designs CI triggers and validation stages for pull-request quality gates.

A team maintains a .NET service in Azure Repos and uses YAML pipelines. It wants every pull request targeting main to restore dependencies, compile, run unit tests, and publish test results before reviewers can complete the request. Changes pushed to feature branches should also receive fast feedback. A successful validation must apply to the exact proposed merge result, and the team does not want a second full run triggered by the merge commit. Which two actions should the team take? Select two.

Correct Answer: A. Configure continuous integration for feature branches and run restore, build, unit tests, and test-result publication.; B. Configure YAML pull-request validation for main and require its build status through the branch policy.
Explanation:

Pull-request validation runs against the proposed change and, when required by the branch policy, prevents completion until the validation succeeds. CI on feature branches provides earlier feedback as developers push changes. Running only after merge is too late to protect main, and scheduled validation leaves a window in which unvalidated code can be merged. Local logs and review alone do not provide the requested enforceable, reproducible gate.

Question 4

New Multiple answers

Topic: Design and implement build and release pipelines

Skill tested: Promotes immutable pipeline artifacts through environments with environment-specific approvals.

A regulated team builds a containerized service once and deploys it to test, staging, and production. The same image digest must be promoted through all three environments; rebuilding between environments is prohibited. Production requires an approval from an operations manager, while test deployments should proceed automatically. The team also needs a clear record of which deployment used each artifact. Which two design choices best meet these requirements? Select two.

Correct Answer: D. Use deployment stages targeting Azure Pipelines environments and configure an approval check on the production environment.; E. Publish the image with an immutable digest from the build and have each deployment stage consume that same digest.
Explanation:

An immutable image digest identifies the exact artifact, so promotion does not change the bits that were tested. Azure Pipelines environments support deployment history and checks, including an approval on production while leaving test automatic. Rebuilding per environment violates the once-built requirement. Approval in the build is not an environment-specific deployment gate, and mutable tags can resolve to different images over time.

Question 5

New Single answer

Topic: Design and implement build and release pipelines

Skill tested: Chooses caching and artifact strategies to reduce pipeline time without weakening reproducibility.

A large application pipeline spends most of its time downloading package dependencies. The build agents are Microsoft-hosted and therefore do not retain files between jobs. The team needs repeatable builds and must still publish a deployable package that later stages can consume. Which change is the most appropriate first optimization?

Correct Answer: A. Use a pipeline cache keyed by dependency lock files for downloaded packages, while continuing to publish the build output as a pipeline artifact.
Explanation:

Pipeline caching can reuse dependency files across runs when the cache key matches, while lock-file-based keys help keep cache contents aligned with declared dependencies. The produced deployable output should remain a pipeline artifact for downstream stages. Artifacts transfer outputs; they are not a substitute for cache restore semantics. Hosted agents are ephemeral, so assuming persistent files or a long-lived filesystem is not reliable.

Question 6

New Single answer

Topic: Design and implement build and release pipelines

Skill tested: Configures pipeline quality gates using test results and code coverage thresholds.

A team has a pipeline that successfully compiles its application, but recent releases have contained regressions. Unit tests run in the pipeline, yet their results are not published and a stage can succeed even when tests fail. The team wants a reliable gate before artifact publication. Developers also want coverage trends, but a fixed coverage percentage must not be used as the only quality measure because the legacy codebase has uneven coverage. What should the team do?

Correct Answer: C. Publish test results, configure the test task to fail on test failures, and report coverage for trend analysis before publishing the artifact.
Explanation:

Publishing test results makes outcomes visible, and configuring test execution to fail the job ensures failures stop the pipeline before artifact publication. Coverage reporting helps teams track progress without treating a single percentage as the sole measure of quality, as required here. Coverage alone does not prove correctness, and a compiler-success result does not indicate that tests passed. Post-publication checks and manual approvals do not provide the requested pre-publication automated gate.

Question 7

New Single answer

Topic: Design and implement build and release pipelines

Skill tested: Implements deployment strategies that limit risk and support controlled production rollout.

An online service must release a new version with minimal customer impact. The team can route a small portion of production traffic to a new deployment and monitor health before increasing exposure. It must be able to return traffic to the previous version quickly if application errors rise. Database changes are backward-compatible for one release cycle. Which deployment approach best matches these requirements?

Correct Answer: A. Use a canary rollout, progressively increase traffic to the new version, and retain the previous version for rollback.
Explanation:

A canary rollout exposes the new version to a limited portion of traffic, enabling health evaluation before broader rollout. Keeping the prior version available supports fast rollback if the monitored error rate rises. A one-shot replacement increases blast radius and slows recovery. Test-only deployment does not meet the production rollout requirement, and deleting the prior version removes a practical rollback option.

Question 8

New Multiple answers

Topic: Design and implement build and release pipelines

Skill tested: Separates pipeline stages and conditions to promote only validated artifacts.

A team wants a multi-stage YAML pipeline that builds and tests a web application on every change to main, then deploys the resulting artifact to a nonproduction environment. Production deployment should occur only for a successful run from main and should use the same artifact tested in nonproduction. Pull-request runs must never deploy. The team wants to avoid maintaining a separate release definition. Which two choices should it make? Select two.

Correct Answer: C. Place production deployment in a stage with conditions that require success and the intended main-branch source.; D. Publish the build output as a pipeline artifact and have later deployment stages download that artifact.
Explanation:

Publishing and consuming a pipeline artifact lets later stages deploy the same tested output rather than rebuilding it. Stage conditions can restrict production deployment to successful runs from main, excluding pull-request runs. Rebuilding can produce different bits from those validated in nonproduction. Allowing pull-request deployments violates the explicit constraint, and YAML stages can share artifacts without requiring unrelated, independently maintained definitions.

Question 9

New Single answer

Topic: Develop a security and compliance plan

Skill tested: Secures Azure service connections with workload identity federation and least privilege.

A company has an Azure Resource Manager service connection used by a YAML deployment pipeline. Security policy prohibits long-lived client secrets, and the pipeline must deploy only to one resource group. The organization can configure an app registration or managed identity and grant Azure role assignments. Which approach best meets the policy while limiting access?

Correct Answer: B. Configure workload identity federation for the service connection and grant its identity only the required deployment role at the target resource-group scope.
Explanation:

Workload identity federation avoids storing a long-lived client secret and supports Azure service-connection authentication. Assigning only the required role at the resource-group scope applies least privilege and matches the deployment boundary. A pipeline variable still stores a secret, subscription-wide Owner is excessive, and a personal access token is not an Azure Resource Manager credential. A certificate committed to source control is unsafe and the broad subscription scope exceeds the requirement.

Question 10

New Single answer

Topic: Develop a security and compliance plan

Skill tested: Chooses secure secret storage and access boundaries for pipeline deployment credentials.

A deployment pipeline needs to read a database password at runtime. The password must not appear in repository files, pipeline YAML, or ordinary logs. Only the deployment pipeline should be able to retrieve it, and administrators need an auditable rotation process. The workload cannot use managed identity because its execution environment is not hosted in Azure. What should the team implement?

Correct Answer: A. Store the secret in Azure Key Vault, grant the pipeline service connection narrowly scoped access, and retrieve it through a Key Vault task or variable group.
Explanation:

Azure Key Vault provides centralized secret storage and supports controlled access and rotation. A narrowly scoped pipeline identity can retrieve the password at runtime without putting it in source or YAML; secret handling and logging should still be configured carefully. An encrypted repository file spreads key-management responsibilities to developers. A nonsecret variable is exposed, and command-line arguments can leak through process or diagnostic output even when log masking is enabled.

Question 11

New Single answer

Topic: Implement an instrumentation strategy

Skill tested: Configures Application Insights telemetry and Azure Monitor alerting for application failures.

A service team uses Application Insights and Azure Monitor. Following a deployment, users report intermittent failures, but the current dashboard shows only aggregate request volume. The team needs an alert when the server-side failure rate becomes abnormal and wants responders to correlate failures with the deployed application version. It does not want an alert on every isolated failed request. What is the best approach?

Correct Answer: D. Emit versioned Application Insights telemetry, create an Azure Monitor alert based on an aggregated failure-rate metric or query over a suitable time window, and route it to an action group.
Explanation:

Versioned telemetry supports correlation between failures and the deployed release. An aggregated failure-rate signal over a suitable window avoids paging on every isolated error while still detecting abnormal behavior; an Azure Monitor action group delivers the alert. Per-request alerts create noise and lack release context. Pipeline completion indicates deployment activity, not runtime health, while volume alone cannot identify failure rates.

Question 12

New Single answer

Topic: Implement an instrumentation strategy

Skill tested: Uses Azure Monitor pipeline telemetry to detect operational failures and notify responders.

A platform team operates several Azure Pipelines and must notify an on-call group when production deployments fail. Alerts should identify the affected pipeline and run, and successful deployments should not page responders. The team already sends pipeline diagnostic data to a Log Analytics workspace and uses Azure Monitor action groups. What should the team configure?

Correct Answer: C. Create a scheduled-query alert over the collected pipeline records that filters failed production deployments and includes identifying run details in the alert payload.
Explanation:

A scheduled-query alert can evaluate the pipeline records already collected in Log Analytics, filter for failed production deployments, and send context through an action group. This meets the requirement to alert only on relevant failures and identify the pipeline run. Alerting on every run creates noise, while an availability test of the pipeline interface does not report deployment outcomes. Azure Boards work-item state is not the specified operational telemetry source.