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

Question 270

A GitHub organization wants only organization owners to create new repositories so approved settings can be applied at creation. Ordinary members should still contribute to existing repositories. Which organization setting enforces this?

  1. Require signed annotated tags for releases in existing repositories
  2. Enable automatic deletion of branches after pull requests merge
  3. Grant every member an Admin role on all repositories
  4. Disable repository creation by ordinary organization members

Explanation

Correct Answer

D:

GitHub organization settings determine whether ordinary members can create repositories. Disabling member creation leaves owners able to create repositories without changing existing repository contribution rights.

Incorrect Answers

A:

Signed annotated tags attest to release references in repositories that already exist. They have no bearing on who is allowed to create a new organization repository.

B:

Automatically deleting merged branches is a repository hygiene setting. New repositories could still be created by members without a creation restriction.

C:

Repository Admin privileges grant broad control over existing repositories and would weaken least privilege. They are not an organization-wide repository-creation policy.

Question 271

A build successfully compiles locally but gets unauthorized errors while restoring a private Azure Artifacts package on hosted agents. What pipeline configuration should be checked?

  1. Grant feed Reader to download without publishing
  2. Grant feed Publisher to a dedicated release pipeline
  3. Create an Azure Artifacts feed for internal libraries
  4. Separate feed publication from feed promotion
  5. Use project-scoped feeds for narrow ownership
  6. Authenticate restore tasks to Azure Artifacts

Explanation

Correct Answer

F:

Package authentication steps and feed permissions provide a job identity with the credentials needed to restore protected dependencies.

Incorrect Answers

A:

Reader-level Azure Artifacts permissions allow package consumption while reserving publication and promotion for higher-privileged roles; although that supports download-only package access, this scenario calls for pipeline identity for private package restore.

B:

A publishing role permits package additions without granting all owner-level feed configuration capabilities; pipeline identity for private package restore cannot be inferred from least-privilege automated publication alone.

C:

Azure Artifacts feeds store and distribute supported package types with access controls and integration into build tasks; the distinction is centralized private dependency distribution versus pipeline identity for private package restore.

D:

Publishing to the feed and independently promoting selected versions to a release view separates creation from trust decisions; pipeline identity for private package restore cannot be delivered through package release authorization step.

E:

Project-scoped feeds align package access with project boundaries and can authorize external projects explicitly; its effect is project-bounded package administration, not pipeline identity for private package restore.

Question 272

A developer accidentally overwrote an important configuration file and wants its prior content without rolling back unrelated changes. Which Git approach fits?

  1. Restore one tracked file from a previous commit
  2. Use git reflog to recover a lost local tip
  3. Use git stash for temporary unfinished edits
  4. Use git bisect to locate a regression

Explanation

Correct Answer

A:

git restore with a chosen source revision retrieves a file's content from the specified tree into the worktree or index.

Incorrect Answers

B:

git reflog records local reference updates, often exposing prior commit hashes that can be restored before garbage collection; it contributes to local reference move recovery, with recovering selected file contents still requiring its own control.

C:

git stash saves eligible uncommitted work for later reapplication, freeing the worktree for a different task; this solves temporary worktree shelving, leaving recovering selected file contents unresolved.

D:

git bisect performs a binary search through commit history using good/bad test results to isolate the first failing change; this option addresses identifying the first faulty commit rather than addressing recovering selected file contents.

Question 273

A pipeline needs to deploy to one Azure subscription using an approved workload identity instead of developer user credentials. Which Azure DevOps resource should be configured?

  1. Restrict agent pool use to trusted pipelines
  2. Use a project team for backlog ownership
  3. Use an Azure Resource Manager service connection
  4. Stream Azure DevOps audit events to Azure Monitor Logs

Explanation

Correct Answer

C:

Azure Resource Manager service connections provide controlled Azure authentication and target scope to pipeline tasks.

Incorrect Answers

A:

Agent pools have their own access controls and pipeline permissions, limiting which definitions can execute on sensitive workers; protected worker-pool consumption concerns a different control point than authorized pipeline Azure connection.

B:

Project teams have backlog settings and area/iteration associations that organize work tracking within a shared project; here authorized pipeline Azure connection is the target, not team-specific Boards configuration.

D:

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; authorized pipeline Azure connection cannot be inferred from externally retained DevOps governance event history alone.

Question 274

Business reviewers need to participate in supported Azure Boards work-tracking activities without broad developer tools. Which access level should be assessed?

  1. Limit repository bypass policy rights
  2. Restrict personal access token scope and expiration
  3. Use Stakeholder access for limited work tracking
  4. Authorize a service connection only for approved pipelines

Explanation

Correct Answer

C:

Stakeholder access provides a limited set of Azure DevOps features focused on work tracking rather than full developer capabilities.

Incorrect Answers

A:

Bypass policy rights allow exceptional merges or pushes and should be assigned only to tightly controlled operators; that changes exceptional branch-policy override without delivering low-privilege business work access.

B:

Reducing PAT scopes, allowed organizations, and lifetimes limits damage if a token is disclosed; minimal Azure DevOps PAT authority cannot substitute for low-privilege business work access.

D:

Pipeline permissions on protected service connections control which pipeline definitions may consume the connection; it contributes to protected connection consumer scope, with low-privilege business work access still requiring its own control.

Question 275

Pipelines work off-hours but slow markedly during the workday; the pool has many queued jobs and no idle agents. What should be investigated?

  1. Check agent tool versions during environment drift
  2. Track build success rate by pipeline
  3. Set artifact retention by compliance category
  4. Diagnose self-hosted agent exhaustion

Explanation

Correct Answer

D:

Agent utilization and queue length reveal whether workload demand exceeds available qualified worker capacity.

Incorrect Answers

A:

Inspecting capabilities, installed runtimes, and agent image versions exposes toolchain drift between workers; peak worker utilization shortage remains outside the responsibility of inconsistent host tooling diagnosis.

B:

Success and failure ratios by pipeline reveal reliability problems in particular delivery definitions over time; that acts on pipeline-specific pass rate, whereas the requested outcome is peak worker utilization shortage.

C:

Different retention requirements should be applied to short-lived build outputs and preserved release assets according to compliance needs; tiered artifact lifecycle concerns a different control point than peak worker utilization shortage.

Question 276

A deployment stage targets production and must pause until an authorized operations reviewer approves, without allowing YAML authors to remove the rule. Where should it be configured?

  1. Add a business-hours check
  2. Add a secure-file approval check
  3. Add an Invoke Azure Function check
  4. Add an approval check to the production environment

Explanation

Correct Answer

D:

Environment owners define approvals outside the pipeline YAML, so a stage consuming the protected environment must satisfy them.

Incorrect Answers

A:

Business Hours checks defer resource use until configured local windows rather than relying only on the pipeline queue time; resource-owner-controlled human approval cannot be delivered through scheduled release window enforcement.

B:

A secure file can have an approval check that gates consumption even by an otherwise authorized pipeline; its effect is human review of signing-file use, not resource-owner-controlled human approval.

C:

The Azure Function check invokes approved external logic as part of a protected resource's predeployment evaluation; that changes custom function-based release validation without delivering resource-owner-controlled human approval.

Question 277

New application binaries require a column that does not yet exist, and instances fail during rolling deployment. Which stage dependency addresses this?

  1. Require a database compatibility test before promotion
  2. Separate application and database rollback strategies
  3. Use a migration ordering gate before application startup
  4. Validate schema changes on a production-like dataset
  5. Use backward-compatible stored procedure changes
  6. Version database schema migrations with application code

Explanation

Correct Answer

C:

Running compatible schema additions before deploying consumers prevents application startup against an unsupported database contract.

Incorrect Answers

A:

Integration tests exercising the candidate application against the migrated schema catch contract mismatch before production promotion; this option addresses application-schema contract verification rather than addressing schema-before-dependent-code ordering.

B:

Database changes need explicit recovery or forward-fix handling because code rollback alone does not reverse mutated stored data; it handles independent data rollback planning but cannot by itself deliver schema-before-dependent-code ordering.

D:

Rehearsing migrations on realistic data volumes exposes locking, performance, and compatibility problems absent from trivial test fixtures; that acts on representative migration execution, whereas the requested outcome is schema-before-dependent-code ordering.

E:

Compatible procedure interfaces or parallel versions allow old and new clients to operate during the transition; stable database API for multiple versions concerns a different control point than schema-before-dependent-code ordering.

F:

Source-controlled migration scripts version database changes alongside application revisions and allow controlled execution in the release workflow; here schema-before-dependent-code ordering is the target, not versioned database evolution.

Question 278

Several Azure resources emit diagnostic events and engineers need centralized KQL queries across their logs. Which destination should be configured?

  1. Use an action group for alert delivery
  2. Configure diagnostic settings on an Azure resource
  3. Use an Azure Monitor Log Analytics workspace
  4. Set appropriate workspace data retention

Explanation

Correct Answer

C:

A Log Analytics workspace stores supported Azure Monitor Logs data for shared analysis, alerting, and cross-resource queries.

Incorrect Answers

A:

Action groups connect alert rules to notification channels and automation receivers such as email, SMS, and webhooks; centralized searchable operational logs cannot be inferred from alert recipient and action routing alone.

B:

Resource diagnostic settings send supported log and metric categories to destinations such as a Log Analytics workspace; the distinction is forwarding resource telemetry versus centralized searchable operational logs.

D:

Log Analytics retention and archive settings govern how long ingested records remain available for interactive queries and longer-term retrieval; its effect is policy-compliant telemetry lifetime, not centralized searchable operational logs.

Question 279

Twenty YAML pipelines in one project repeat the same nonsecret endpoint names and a few centrally controlled secrets. Which construct reduces drift?

  1. Use template expressions for parameter-driven structure
  2. Use a condition checking succeeded()
  3. Use a variable group for shared environment settings
  4. Use secret pipeline variables for confidential values
  5. Use dependsOn to order jobs

Explanation

Correct Answer

C:

Variable groups centralize named variables for authorized pipelines, with optional secret integration and access controls.

Incorrect Answers

A:

Compile-time template expressions evaluate parameters and statically available variables while expanding reusable YAML structure; it contributes to compile-time job graph generation, with shared pipeline configuration still requiring its own control.

B:

The succeeded() expression evaluates execution status and gates work on successful prerequisite completion; this solves success-dependent execution, leaving shared pipeline configuration unresolved.

D:

Secret variables store sensitive settings outside checked-in YAML and require controlled injection into task environments; it handles runtime secret injection but cannot by itself deliver shared pipeline configuration.

E:

A dependsOn relationship establishes an execution dependency between jobs or stages, enabling controlled ordering and status evaluation; shared pipeline configuration remains outside the responsibility of explicit job prerequisite ordering.

Question 280

One Azure DevOps release pipeline deploys staging into Azure subscription A and production into subscription B. Each environment requires its own least-privilege workload identity, and only the approved release pipeline may consume either connection. Which design fits?

  1. Use one subscription-wide service connection backed by a shared administrator credential
  2. Place both subscriptions’ long-lived client secrets directly into the shared YAML file
  3. Grant the staging deployment identity Owner at the management-group scope
  4. Create separate scoped Azure Resource Manager service connections and authorize their pipeline consumption

Explanation

Correct Answer

D:

Separate Azure Resource Manager service connections can use independent workload identities scoped to their target subscriptions or resource groups. Explicitly authorizing only the intended release pipeline for each connection separates cloud authority from broad project-wide connection access.

Incorrect Answers

A:

A single broadly privileged credential undermines the requested identity isolation. A connection scoped to one subscription is not a substitute for a separately authorized production identity.

B:

Committing secrets into YAML exposes long-lived material through version control and gives the shared definition access to both environments. It fails both credential hygiene and separation requirements.

C:

An Owner role over a management group gives the lower-trust staging identity unnecessary authority over production resources, contradicting the stated blast-radius boundary.

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