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

Question 410

An Azure Pipelines self-hosted agent in a virtual network can authenticate to Key Vault, but the vault firewall blocks its requests. Security requires that the vault remain inaccessible from the public internet. Which change addresses the network path?

  1. Create a Key Vault private endpoint and ensure the agent resolves the vault hostname to its private address
  2. Give the agent identity Owner at subscription scope without changing network connectivity
  3. Allowlist an arbitrary public hosted-agent IP address and enable public access to the vault
  4. Create a private endpoint for Azure Storage while leaving the vault public endpoint blocked
  5. Increase the Azure Pipelines job timeout to allow the blocked request to retry

Explanation

Correct Answer

A:

A Key Vault private endpoint gives the VNet a private route to the vault. Correct private DNS resolution and network reachability let the agent use that route while public network access stays disabled.

Incorrect Answers

B:

Additional Azure RBAC permissions cannot repair a network firewall denial. Authentication and authorization are distinct from the private network path needed here.

C:

Public IP allowlisting depends on public network access and does not satisfy the requirement to keep the vault inaccessible from the internet.

D:

A private endpoint for an Azure Storage account only changes connectivity to that storage account, not the Key Vault endpoint rejecting the agent’s request.

E:

Longer retries do not change firewall rules, DNS resolution, or private endpoint routing; the vault remains unreachable.

Question 411

An Azure DevOps automation PAT has full organization access and never expires, although it only reads work items weekly. What change improves security?

  1. Use Basic access for typical development features
  2. Restrict personal access token scope and expiration
  3. Stream Azure DevOps audit events to Azure Monitor Logs
  4. Use an Azure Resource Manager service connection
  5. Use Stakeholder access for limited work tracking

Explanation

Correct Answer

B:

Reducing PAT scopes, allowed organizations, and lifetimes limits damage if a token is disclosed. Use only work-item read permissions and a limited lifetime, and retire the token when its scheduled job ends.

Incorrect Answers

A:

Basic access supports core Azure DevOps development features subject to the project's security permissions; its effect is full everyday developer feature access, not minimal Azure DevOps PAT authority.

C:

Azure DevOps audit streaming forwards supported organization events to Azure Monitor Logs, where retention can be configured independently of the platform’s native audit history; externally retained DevOps governance event history cannot substitute for minimal Azure DevOps PAT authority.

D:

Azure Resource Manager service connections provide controlled Azure authentication and target scope to pipeline tasks; minimal Azure DevOps PAT authority falls outside the scope of authorized pipeline Azure connection.

E:

Stakeholder access provides a limited set of Azure DevOps features focused on work tracking rather than full developer capabilities; it contributes to low-privilege business work access, with minimal Azure DevOps PAT authority still requiring its own control.

Question 412

A pipeline runs database migrations through a CLI that accepts credentials, and verbose logging may show arguments. What pipeline hardening is needed?

  1. Prevent secret exposure in migration logs
  2. Apply additive schema changes before removing fields
  3. Require a database compatibility test before promotion
  4. Monitor database error rates immediately after migration
  5. Separate application and database rollback strategies

Explanation

Correct Answer

A:

Protected secret injection and logging controls avoid writing database credentials to console output or retained artifacts.

Incorrect Answers

B:

Adding compatible schema structures before switching consumers and later removing old ones allows overlapping application versions to function; migration credential confidentiality remains outside the responsibility of coexistence-safe schema transformation.

C:

Integration tests exercising the candidate application against the migrated schema catch contract mismatch before production promotion; that acts on application-schema contract verification, whereas the requested outcome is migration credential confidentiality.

D:

Query latency and database error telemetry can detect regressions that successful DDL execution alone cannot reveal; runtime postmigration database health concerns a different control point than migration credential confidentiality.

E:

Database changes need explicit recovery or forward-fix handling because code rollback alone does not reverse mutated stored data; here migration credential confidentiality is the target, not independent data rollback planning.

Question 413

Linting, unit tests, and static analysis have no interdependencies and must finish as quickly as agent capacity allows. Which scheduling strategy helps?

  1. Use checkout none for deployment-only jobs
  2. Use parallel jobs for independent work
  3. Use a deployment environment resource reference
  4. Use reusable stages for repeated regional deployments

Explanation

Correct Answer

B:

Independent jobs can execute concurrently when parallel-job entitlements and agents are available, reducing end-to-end critical path time.

Incorrect Answers

A:

Disabling source checkout for jobs that consume only published artifacts avoids needless Git transfer and agent workspace setup; the distinction is removing unused source checkout versus concurrent independent verification.

C:

Environment resource selection narrows the deployment target while preserving environment-level history and checks; its effect is per-resource deployment targeting, not concurrent independent verification.

D:

A parameterized stage template lets each regional stage share tested deployment steps while supplying distinct environment values; that changes templated regional deployment stages without delivering concurrent independent verification.

Question 414

Engineers need an alert when a KQL query finds more than a given number of matching exceptions in a fifteen-minute window. Which rule type applies?

  1. Create a log search alert for correlated failures
  2. Route pipeline deployment events into observability
  3. Use alert processing rules for maintenance windows
  4. Use an action group for alert delivery

Explanation

Correct Answer

A:

Log search alerts periodically evaluate KQL results from Azure Monitor Logs against configured alert conditions.

Incorrect Answers

B:

Deployment annotations or custom events associate release timing and versions with operational metrics and traces; this option addresses release-and-runtime event correlation rather than addressing query-based error-pattern alerting.

C:

Alert processing rules can apply routing or action suppression under specified scope and timing conditions; it handles maintenance-specific notification suppression but cannot by itself deliver query-based error-pattern alerting.

D:

Action groups connect alert rules to notification channels and automation receivers such as email, SMS, and webhooks; query-based error-pattern alerting remains outside the responsibility of alert recipient and action routing.

Question 415

A resource owner has custom validation logic implemented in an Azure Function and wants to run it before each deployment. Which check can execute that logic?

  1. Add an Evaluate artifact check
  2. Add a business-hours check
  3. Add an Invoke Azure Function check
  4. Use post-check approval for completion review

Explanation

Correct Answer

C:

The Azure Function check invokes approved external logic as part of a protected resource's predeployment evaluation.

Incorrect Answers

A:

Evaluate artifact checks assess supported artifact policy information before a stage may consume the protected resource; although that supports predeployment artifact policy evaluation, this scenario calls for custom function-based release validation.

B:

Business Hours checks defer resource use until configured local windows rather than relying only on the pipeline queue time; custom function-based release validation cannot be inferred from scheduled release window enforcement alone.

D:

Post-check approvals are evaluated after eligible dynamic checks according to the resource check order, providing an additional approval point; custom function-based release validation cannot be delivered through late-stage protected-resource approval.

Question 416

A cloud access token appears in a public Git commit, and maintainers intend to rewrite history. What action must occur regardless of cleanup success?

  1. Use git stash for temporary unfinished edits
  2. Use git bisect to locate a regression
  3. Use git reset on unpublished local work
  4. Rotate exposed credentials immediately

Explanation

Correct Answer

D:

Credential revocation or rotation invalidates a secret that may already have been copied; history rewriting alone cannot restore secrecy.

Incorrect Answers

A:

git stash saves eligible uncommitted work for later reapplication, freeing the worktree for a different task; containment of leaked authentication material falls outside the scope of temporary worktree shelving.

B:

git bisect performs a binary search through commit history using good/bad test results to isolate the first failing change; it contributes to identifying the first faulty commit, with containment of leaked authentication material still requiring its own control.

C:

git reset can move the branch reference and optionally change the index and working tree; it should be used carefully on private history; this solves moving an unpublished branch pointer, leaving containment of leaked authentication material unresolved.

Question 417

Two services emit logs for one business transaction but their events cannot be joined reliably. What instrumentation design enables linking?

  1. Attach deployment version to application telemetry
  2. Use correlation IDs across services
  3. Instrument the application with Application Insights
  4. Use sampling to control high-volume telemetry

Explanation

Correct Answer

B:

Propagating trace context or correlation identifiers associates related telemetry across service boundaries. Propagate the identifier across outgoing calls so a query can reconstruct a single transaction across services.

Incorrect Answers

A:

Recording application version or release identifiers with telemetry enables per-version filtering and regression comparison; version-specific canary analysis concerns a different control point than shared operation identity.

C:

Application Insights collects application requests, failures, dependencies, traces, and usage signals through supported instrumentation; although that supports code-level service performance observation, this scenario calls for shared operation identity.

D:

Telemetry sampling reduces selected event volume while retaining enough context for supported analysis and correlated investigation; shared operation identity cannot be inferred from cost-aware telemetry volume control alone.

Question 418

During a rolling replacement, new replicas must not receive traffic before readiness, and old replicas must finish in-flight requests before termination. Which TWO mechanisms address these separate risks? Choose TWO.

  1. Drain connections before removing old replicas
  2. Use readiness probes behind a load balancer
  3. Configure slot-sticky settings
  4. Deploy an urgent hotfix through a controlled fast path
  5. Maintain sufficient spare capacity for rolling updates

Explanation

Correct Answers

A:

Connection draining and graceful termination allow in-flight requests to complete before a retiring instance stops; draining handles existing client sessions, whereas readiness checks are needed before new replicas accept work.

B:

Readiness checks keep instances out of eligible traffic rotation until they can serve real requests. The readiness probe protects new instances; connection draining separately protects requests already running on old instances.

Incorrect Answers

C:

Deployment slot settings remain tied to their designated slot during swaps, preserving environment-specific configuration; traffic admission after application readiness falls outside the scope of retaining environment credentials across swaps.

D:

A hotfix branch or targeted change can pass abbreviated risk-based checks and controlled promotion while preserving audit links and a merge-back plan; it contributes to expedited traceable emergency release, with traffic admission after application readiness still requiring its own control.

E:

Surge or spare capacity ensures enough healthy instances remain available while replacements are created and validated; this solves rollout capacity headroom, leaving traffic admission after application readiness unresolved.

Question 419

A build needs to push back a generated version file, but source checkout credentials have limited lifetime and permissions. What should be explicitly managed?

  1. Use multiple checkout steps
  2. Use pipeline checkout credentials only for required operations
  3. Use a repository resource for another Git repository
  4. Configure GitHub status checks for Azure Pipeline validation
  5. Use a repository alias for cross-repository templates

Explanation

Correct Answer

B:

The job must use an authorized identity with repository write rights and deliberately expose credentials where a push operation is necessary.

Incorrect Answers

A:

Multiple checkout steps fetch the primary and declared secondary repositories into the job workspace; controlled writeback from pipeline execution remains outside the responsibility of simultaneous workspace repository access.

C:

YAML repository resources define additional repositories, their endpoints, and revisions for use in checkout or templates; cross-repository pipeline inputs concerns a different control point than controlled writeback from pipeline execution.

D:

The pipeline reports status, while GitHub branch rules must explicitly require the relevant status check before merge; here controlled writeback from pipeline execution is the target, not mandatory consumption of external CI status.

E:

A named repository resource alias identifies the intended external template source and disambiguates references across the imported repositories; although that supports unambiguous template repository selection, this scenario calls for controlled writeback from pipeline execution.

Question 420

Test owners want to know how many bugs are discovered only after production release relative to defects detected earlier. Which quality measure is most informative?

  1. Use a cumulative flow diagram
  2. Use burndown to assess sprint progress
  3. Track change failure rate
  4. Measure lead time for changes
  5. Track escaped defect rate
  6. Track time to restore service

Explanation

Correct Answer

E:

Escaped defects identify problems that pass preproduction verification, allowing evaluation of the effectiveness of the testing process.

Incorrect Answers

A:

A cumulative flow diagram shows counts in each workflow state across dates, making bottlenecks and expanding queues visible; postrelease defect escape cannot be delivered through stage-by-stage flow bottlenecks.

B:

Burndown charts plot remaining scope against time and reveal whether work is being completed at the rate needed for the sprint; its effect is remaining-sprint-work trend, not postrelease defect escape.

C:

Change failure rate measures the share of production changes that produce degraded service or need restoration actions; that changes production deployment failure impact without delivering postrelease defect escape.

D:

Lead time for changes measures elapsed time from a change entering the delivery stream to successful production deployment; commit-to-production elapsed time cannot substitute for postrelease defect escape.

F:

Time to restore service captures the elapsed time required to recover normal operation after a production incident; it contributes to incident recovery duration, with postrelease defect escape still requiring its own control.

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