Microsoft AZ-400 (Designing and Implementing Microsoft DevOps Solutions) Practice Test 2

Question 10

A one-off integration requires a user-associated GitHub token but should be limited to one repository and selected operations. Which token model best matches?

  1. Use a fine-grained personal access token when a PAT is unavoidable
  2. Use installation access tokens for GitHub App API calls
  3. Use outside collaborator access for a contractor
  4. Use protected environments to gate secret access

Explanation

Correct Answer

A:

Fine-grained personal access tokens can narrow repository selection, permissions, and expiration compared with broad classic tokens.

Incorrect Answers

B:

An installation access token provides time-limited API authority according to the app's installed repositories and permissions; operational GitHub App installation identity concerns a different control point than limited user-backed integration access.

C:

Outside collaborators receive targeted repository access without organization membership, under relevant organizational restrictions; here limited user-backed integration access is the target, not repository-only external participation.

D:

GitHub environment protection rules can gate job execution and access to environment-scoped secrets; although that supports guarded production secret exposure, this scenario calls for limited user-backed integration access.

Question 11

Azure virtual machines must be assessed for file and OS settings against a common compliance baseline, not just for Azure resource properties. Which service area applies?

  1. Use configuration validation in PR checks
  2. Build immutable VM images for repeatable agents
  3. Use Azure Deployment Environments for self-service
  4. Use Azure Machine Configuration for guest compliance

Explanation

Correct Answer

D:

Azure Machine Configuration evaluates guest operating-system configuration against defined policies and can support enforcement scenarios.

Incorrect Answers

A:

Template linting and validation with representative parameter inputs detect missing settings before a promotion run; its effect is configuration input completeness, not VM guest-state compliance.

B:

Image-based provisioning captures approved OS and tool versions as immutable templates from which new workers can be created; that changes reproducible worker operating system without delivering VM guest-state compliance.

C:

Azure Deployment Environments supports catalog-based self-service provisioning today, but existing users must migrate before its announced February 2027 retirement; controlled developer self-provisioning cannot substitute for VM guest-state compliance.

Question 12

A library publishes Git tags and needs release notes for changes since the preceding tag. Which automation input is most appropriate?

  1. Automate changelog generation at tagged releases
  2. Use conventional commits for change classification
  3. Create a postincident retrospective document
  4. Use an Azure DevOps project wiki

Explanation

Correct Answer

A:

Comparing commits or merged pull requests between release tags establishes a bounded change set for each published version.

Incorrect Answers

B:

Conventional Commits provides structured prefixes and breaking-change markers that tools can interpret for changelog and version generation; release-bound change interval remains outside the responsibility of parseable semantic commit history.

C:

A blameless retrospective captures timeline, contributing conditions, detection gaps, and assigned follow-up actions for systemic improvement; that acts on learning from production incidents, whereas the requested outcome is release-bound change interval.

D:

Azure DevOps wikis give teams Markdown-based project documentation with collaborative editing and navigation inside the project; native project knowledge repository concerns a different control point than release-bound change interval.

Question 13

Every build downloads the same npm packages from scratch, wasting minutes, but generated package artifacts should still be created afresh. Which action capability helps?

  1. Use artifact attestations for release provenance
  2. Cache dependencies in GitHub Actions
  3. Restrict GITHUB_TOKEN permissions
  4. Use composite actions for repeated step logic

Explanation

Correct Answer

B:

Dependency caching saves reusable package-download data keyed by dependency state while leaving published build artifacts separately versioned.

Incorrect Answers

A:

Artifact attestations associate verifiable provenance statements with build outputs, improving downstream verification of their origin; the distinction is verifiable GitHub-generated artifact provenance versus reuse of expensive dependency downloads.

C:

Declaring minimal permissions at workflow or job scope reduces the authority of the automatically issued GITHUB_TOKEN; its effect is least-privilege native workflow token, not reuse of expensive dependency downloads.

D:

Composite actions bundle related steps into a callable action usable within an existing job; that changes portable in-job step assembly without delivering reuse of expensive dependency downloads.

Question 14

Two independently triggered services both attempt a migration against one shared database, causing lock contention. What orchestration control should be added?

  1. Separate application and database rollback strategies
  2. Monitor database error rates immediately after migration
  3. Use a deployment lock around shared schema updates
  4. Back up production data before high-risk release

Explanation

Correct Answer

C:

Serializing schema modification stages prevents concurrent migration attempts against the same shared database resource.

Incorrect Answers

A:

Database changes need explicit recovery or forward-fix handling because code rollback alone does not reverse mutated stored data; this solves independent data rollback planning, leaving exclusive database upgrade execution unresolved.

B:

Query latency and database error telemetry can detect regressions that successful DDL execution alone cannot reveal; this option addresses runtime postmigration database health rather than addressing exclusive database upgrade execution.

D:

A verified backup or restore point provides recoverability for destructive data operations that an application rollback cannot undo; exclusive database upgrade execution remains outside the responsibility of prechange data recovery point.

Question 15

A partner build needs to consume approved packages but must never push or promote new versions to the shared feed. Which permission model is appropriate?

  1. Use project-scoped feeds for narrow ownership
  2. Grant feed Reader to download without publishing
  3. Pin a dependency to an approved internal version
  4. Use an organization-scoped feed for shared components

Explanation

Correct Answer

B:

Reader-level Azure Artifacts permissions allow package consumption while reserving publication and promotion for higher-privileged roles.

Incorrect Answers

A:

Project-scoped feeds align package access with project boundaries and can authorize external projects explicitly; although that supports project-bounded package administration, this scenario calls for download-only package access.

C:

Exact dependency versions and lockfiles help consumers restore a reviewed artifact rather than whatever is newest in a range; the distinction is approved dependency reproducibility versus download-only package access.

D:

Organization-scoped Azure Artifacts feeds support cross-project package reuse through common feed permissions and endpoints; download-only package access cannot be delivered through organization-wide dependency catalog.

Question 16

Multiple Azure DevOps projects need access to a centrally patched fleet rather than each project maintaining separate agent machines. What resource should operators manage?

  1. Use a dedicated pool for untrusted pull requests
  2. Use a self-hosted agent for a private network target
  3. Use agent demands and capabilities
  4. Use an agent pool for shared self-hosted capacity
  5. Use container jobs to normalize build tooling
  6. Keep deployment credentials outside agent images

Explanation

Correct Answer

D:

Agent pools group self-hosted workers with controlled project permissions, enabling shared execution capacity.

Incorrect Answers

A:

Segregating untrusted workloads onto tightly scoped ephemeral workers limits credential and network exposure to attacker-controlled build scripts; centralized managed worker fleet falls outside the scope of hostile-source execution isolation.

B:

A self-hosted agent placed on a reachable network can execute deployment steps against private resources using outbound service connectivity; it contributes to private network execution reachability, with centralized managed worker fleet still requiring its own control.

C:

Agent capabilities advertise available tools or attributes, and demands constrain scheduling to matching agents; this solves tool-aware agent placement, leaving centralized managed worker fleet unresolved.

E:

Container jobs run task steps inside a specified container image, making tool versions more repeatable across compatible hosts; it handles isolated standardized build environment but cannot by itself deliver centralized managed worker fleet.

F:

Inject credentials at job runtime with short-lived identity or protected secrets rather than baking them into reusable machine images; centralized managed worker fleet remains outside the responsibility of elimination of image-embedded credentials.

Question 17

A new release causes a severe regression, and rebuilding an old commit would be too slow or risk new dependencies. What should recovery use?

  1. Use a rollback-ready previous artifact
  2. Use idempotent deployment scripts
  3. Apply expand-and-contract database migration
  4. Use failure-domain-aware rollout waves

Explanation

Correct Answer

A:

Retaining the previously approved immutable artifact permits rapid redeployment of already tested bits. Reusing the released package avoids recompilation drift, although compatibility with the current database still needs checking.

Incorrect Answers

B:

Idempotent operations reach the desired end state even when repeated, making safe retries possible after partial execution; here fast return to a known release is the target, not repeatable partial deployment recovery.

C:

Expand-and-contract migrations introduce backward-compatible schema changes first, transition consumers, and remove old structures only after compatibility is no longer needed; although that supports schema compatibility during version overlap, this scenario calls for fast return to a known release.

D:

Zone-aware sequential deployment waves keep healthy capacity in unaffected zones while each wave is verified; fast return to a known release cannot be inferred from zonal release blast-radius reduction alone.

Question 18

A Kanban board shows that testing cards are accumulating, and the team wants to reveal growing work-in-progress by workflow stage over time. Which visualization helps?

  1. Use a cumulative flow diagram
  2. Track escaped defect rate
  3. Track time to restore service
  4. Distinguish deployment frequency from build frequency

Explanation

Correct Answer

A:

A cumulative flow diagram shows counts in each workflow state across dates, making bottlenecks and expanding queues visible.

Incorrect Answers

B:

Escaped defects identify problems that pass preproduction verification, allowing evaluation of the effectiveness of the testing process; postrelease defect escape cannot substitute for stage-by-stage flow bottlenecks.

C:

Time to restore service captures the elapsed time required to recover normal operation after a production incident; stage-by-stage flow bottlenecks falls outside the scope of incident recovery duration.

D:

Deployment frequency counts successful releases to the target production environment rather than CI runs or commits; it contributes to production release cadence, with stage-by-stage flow bottlenecks still requiring its own control.

Question 19

An organization proposes keeping permanent dev, test, and prod branches, but deployments often diverge and fixes are difficult to reconcile. What alternative should architects favor?

  1. Cherry-pick a validated fix into a maintenance branch
  2. Adopt trunk-based development with small integrations
  3. Use a hotfix branch from the production revision
  4. Use branch-per-environment only with clear tradeoffs

Explanation

Correct Answer

D:

Building one immutable artifact from a shared mainline and promoting it across environments reduces code drift caused by long-lived environment branches.

Incorrect Answers

A:

Cherry-pick applies the changes introduced by a chosen commit onto the target branch without merging its entire ancestry; artifact promotion instead of branch drift remains outside the responsibility of selective cross-branch fix transfer.

B:

Trunk-based development relies on frequent small merges to a shared mainline, often shielding unfinished functionality behind flags; that acts on minimizing branch divergence, whereas the requested outcome is artifact promotion instead of branch drift.

C:

Branching from the deployed release commit isolates an urgent correction from unrelated unshipped changes; production-specific patch isolation concerns a different control point than artifact promotion instead of branch drift.

Question 20

A release must expand traffic from pilot to broad availability only while latency and errors remain inside thresholds. Which rollout design fits?

  1. Use feature flags to decouple release and launch
  2. Use rolling deployment to update instances incrementally
  3. Use progressive exposure with automatic health gates
  4. Use canary deployment for small initial exposure
  5. Use percentage-based feature targeting

Explanation

Correct Answer

C:

Progressive delivery couples staged exposure with monitored health metrics so advancement can stop or reverse on regression.

Incorrect Answers

A:

Feature flags control application behavior at runtime without requiring a second code deployment for every exposure decision; telemetry-gated exposure expansion cannot be delivered through independent functionality activation.

B:

Rolling deployment updates bounded sets of instances and keeps unaffected replicas serving traffic during the transition; its effect is gradual replica replacement, not telemetry-gated exposure expansion.

D:

Canary deployment exposes a new version to a limited traffic subset before broadening it based on monitored results; low-percentage release exposure cannot substitute for telemetry-gated exposure expansion.

E:

Percentage targeting can expose a flag to a configured user share using consistent targeting rules where supported; telemetry-gated exposure expansion falls outside the scope of stable fractional feature audience.

Designing and Implementing Microsoft DevOps Solutions (AZ-400) Practice Tests