CertLumen

Free practice questions · DevOps

10 Exam AZ-400: Designing and Implementing Microsoft DevOps Solutions practice questions, with answers

Exam-style questions from the CertLumen course, spread over the exam's sections by their weights. Each has its answer and why. They're written for practice: never questions from the real exam.

Question 1 · Design and implement processes and communications

An Azure Repos team must ensure every pull request into main references at least one work item for audit purposes. Which control enforces this?

  1. AThe branch policy Check for comment resolution
  2. BA Boards rule that sets the Reason field on Resolved
  3. CThe branch policy Check for linked work items set to Required
  4. DA team notification for Pull request created or updated
Show the answer

C. Branch policies enforce conditions on the pull request. Check for linked work items in Required mode makes a link a precondition of completion, which provides source traceability from requirement to change.

Question 2 · Design and implement a source control strategy

A team follows Microsoft's release-branch guidance. A bug fix was made on release/20. The same fix must be applied to main without bringing over other release-specific changes. What should the team do?

  1. AMerge release/20 into main directly with a force push so the pull request history is preserved on both branches of the repository
  2. BMerge main into release/20 so both branches contain the same history
  3. CDelete release/20 and recreate it from main and then ask everyone to re-clone the repository
  4. DCreate a feature branch from main, cherry-pick the fix commit onto it, and merge it into main with a pull request
Show the answer

D. Microsoft recommends cherry-picking so you control exactly which commits return to main; merging the whole release branch can bring release-specific changes. The cherry-picked branch still goes through a pull request so main keeps its policies.

Question 3 · Design and implement build and release pipelines

A security reviewer is worried that an attacker could publish a package to nuget.org with the same name as an internal package and a higher version number, so that builds pull the malicious one. Which Azure Artifacts setting protects against this?

  1. AIncrease the retention days of the feed to keep old versions longer for auditing
  2. BLeave Allow externally-sourced versions disabled for the internal package
  3. CMake the feed public
  4. DEnable Allow externally-sourced versions for every package in the feed, including the internal ones
Show the answer

B. This attack is called dependency confusion. Azure Artifacts blocks public versions by default for packages you publish privately; only a Feed Owner can allow external versions.

Question 4 · Design and implement build and release pipelines

A product is shipped on a fixed six-month cadence, each release is supported for 18 months, and customers mainly need to know how recent a build is. Which versioning scheme communicates this best?

  1. AThe build ID from the pipeline
  2. BA random GUID
  3. CSemVer with MAJOR bumped each release
  4. DCalVer such as 26.11
Show the answer

D. CalVer is based on the release date and fits scheduled products and platforms. SemVer is better for libraries where consumers need compatibility signals.

Question 5 · Design and implement build and release pipelines

A change-control policy says production deployments may start only between 02:00 and 05:00 on weekdays. Approvers should still sign off in advance. Which configuration meets this?

  1. AAn Exclusive lock check
  2. BBranch control on main
  3. CA cron schedule in the pipeline trigger only
  4. DApprovals plus Business hours on the environment
Show the answer

D. You can configure both Approvals and Business hours on one environment. The stage waits for approvals and then starts in the next scheduled window.

Question 6 · Design and implement build and release pipelines

A classic release pipeline must wait until a work item query for open blocking bugs returns zero before deploying to production. Which release feature fits?

  1. AThe Manual Intervention task
  2. BA deployment group of target machines
  3. CA post-deployment approval for the release manager
  4. DA pre-deployment gate of type Query Work Items
Show the answer

D. Classic release gates include Invoke Azure Function, Invoke REST API, Query Azure Monitor alerts and Query Work Items. Pre-deployment gates run before the stage.

Question 7 · Design and implement build and release pipelines

A public GitHub repository accepts pull requests from forks. Maintainers want CI to run on those pull requests safely. Which runner choice is best?

  1. AA self-hosted runner that is also the production server
  2. BNo runner; fork pull requests cannot run workflows
  3. CGitHub-hosted runners
  4. DPersistent self-hosted runners on the corporate network
Show the answer

C. Do not use persistent self-hosted runners for public repositories. If self-hosted runners are needed, make them ephemeral and isolated.

Question 8 · Design and implement build and release pipelines

A stage must run only for builds from main. Which stage-level setting expresses this while also requiring the previous stage to succeed?

  1. Atrigger: [main]
  2. BdependsOn: main
  3. Ccondition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
  4. Dcondition: eq(variables['Build.SourceBranch'], 'refs/heads/main') only
Show the answer

C. When you specify a condition, the default succeeded() is no longer applied, so include it explicitly with and().

Question 9 · Develop a security and compliance plan

Six virtual machines in a scale set are deleted and recreated every week. They must always have the same read access to a Key Vault, and the access must be granted once before the VMs exist. Which identity should you use?

  1. AA system-assigned managed identity on each virtual machine
  2. BA service principal with a client secret copied to each VM
  3. CA personal access token owned by the platform engineer
  4. DA user-assigned managed identity assigned to the virtual machines
Show the answer

D. User-assigned managed identities have an independent lifecycle, can be pre-authorized and can be attached to many resources, which suits resources that are recycled often. System-assigned identities are deleted with the resource.

Question 10 · Implement an instrumentation strategy

An AKS cluster named aks-prod already exists in resource group rg-app. You must collect container stdout/stderr logs and Kubernetes events in an existing Log Analytics workspace. Which Azure CLI command enables this?

  1. Aaz aks enable-addons --addon monitoring -g rg-app -n aks-prod --workspace-resource-id <id>
  2. Baz aks update --enable-azure-monitor-metrics -g rg-app -n aks-prod
  3. Caz monitor diagnostic-settings create --resource <aks-id> --workspace <id>
  4. Daz monitor log-analytics workspace link --aks aks-prod
Show the answer

A. Container insights is turned on for an existing cluster with az aks enable-addons --addon monitoring, optionally with --workspace-resource-id. It deploys the containerised Azure Monitor agent and collects stdout/stderr (the ContainerLogV2 table by default), Kubernetes events and pod inventory. Prometheus metrics use a different flag and control plane logs use a diagnostic setting.

How ready are you?

Take ten more, weighted like the real exam, and see your score by section and a rough chance of passing. The course has 358 questions and 4 timed practice exams.

Take the free check

About the course · Free study guide · A question a day by email