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

Question 1

A maintained open-source repository receives broad feature ideas and Q&A threads that are not yet actionable defects or scheduled work. Which GitHub space is suitable?

  1. Use Azure DevOps work item mentions
  2. Configure a GitHub repository webhook
  3. Use Azure Boards team dashboards
  4. Use GitHub Discussions for open-ended community topics

Explanation

Correct Answer

D:

GitHub Discussions supports community conversations, questions, and ideas without treating every exchange as a trackable issue.

Incorrect Answers

A:

Mentioning a colleague in a work item comment notifies that person and preserves discussion context with the tracked work; contextual backlog discussion notification concerns a different control point than exploratory community conversation.

B:

GitHub webhooks send selected repository event payloads to an HTTPS endpoint; a webhook secret supports signature verification; here exploratory community conversation is the target, not signed GitHub event notifications.

C:

Team dashboards group widgets for an Azure DevOps team's work and delivery context, keeping operational views aligned to team scope; although that supports team-specific delivery visibility, this scenario calls for exploratory community conversation.

Question 2

An SRE team needs a shareable dashboard combining time charts, logs, and interactive parameters across services. Which Azure visualization fits?

  1. Create a log search alert for correlated failures
  2. Use Azure Monitor workbooks for incident views
  3. Use alert processing rules for maintenance windows
  4. Set appropriate workspace data retention
  5. Configure diagnostic settings on an Azure resource

Explanation

Correct Answer

B:

Azure Monitor workbooks combine supported queries, metrics, and visual components into reusable operational investigation views.

Incorrect Answers

A:

Log search alerts periodically evaluate KQL results from Azure Monitor Logs against configured alert conditions; that changes query-based error-pattern alerting without delivering parameterized cross-telemetry dashboard.

C:

Alert processing rules can apply routing or action suppression under specified scope and timing conditions; parameterized cross-telemetry dashboard falls outside the scope of maintenance-specific notification suppression.

D:

Log Analytics retention and archive settings govern how long ingested records remain available for interactive queries and longer-term retrieval; it contributes to policy-compliant telemetry lifetime, with parameterized cross-telemetry dashboard still requiring its own control.

E:

Resource diagnostic settings send supported log and metric categories to destinations such as a Log Analytics workspace; this solves forwarding resource telemetry, leaving parameterized cross-telemetry dashboard unresolved.

Question 3

A developer's unpublished feature branch is behind main and the team wants a linear local history before review. Which history operation suits that constraint?

  1. Maintain a release branch for supported fixes
  2. Adopt trunk-based development with small integrations
  3. Rebase a local topic branch before opening a pull request
  4. Protect production release tags

Explanation

Correct Answer

C:

Rebase reapplies local commits onto a newer base, reducing merge commits while rewriting local commit identities.

Incorrect Answers

A:

A release branch isolates version-specific stabilization and hotfixes without freezing ongoing development on main; linearization of unpublished work remains outside the responsibility of parallel supported version maintenance.

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 linearization of unpublished work.

D:

Protected tags and signed release practices stabilize version references and make tampering or unintended movement easier to prevent or detect; here linearization of unpublished work is the target, not immutable release identity.

Question 4

A failed deployment is restarted after a transient outage, but its first database statement may have committed. Which property should migration steps support?

  1. Version database schema migrations with application code
  2. Make database migrations retry-safe
  3. Require a database compatibility test before promotion
  4. Use a migration ordering gate before application startup

Explanation

Correct Answer

B:

Idempotent or state-aware migration execution detects already applied changes and prevents duplicate effects during retry.

Incorrect Answers

A:

Source-controlled migration scripts version database changes alongside application revisions and allow controlled execution in the release workflow; safe partial migration rerun cannot be delivered through versioned database evolution.

C:

Integration tests exercising the candidate application against the migrated schema catch contract mismatch before production promotion; that changes application-schema contract verification without delivering safe partial migration rerun.

D:

Running compatible schema additions before deploying consumers prevents application startup against an unsupported database contract; schema-before-dependent-code ordering cannot substitute for safe partial migration rerun.

Question 5

A legacy noninteractive tool cannot use workload federation, but its Entra application can authenticate using certificates. Which credential design improves controllability?

  1. Prefer a certificate credential over an unmanaged shared password when required
  2. Scope service principal RBAC at the resource group
  3. Use workload identity federation for Azure Pipelines
  4. Use GitHub Actions OIDC federation to Azure

Explanation

Correct Answer

A:

Certificate credentials support asymmetric authentication and rotation, avoiding broad reuse of a plaintext shared client secret.

Incorrect Answers

B:

Azure RBAC assigned to the deployment identity at the target resource group limits actions to that scope and inherited children; it handles resource-group-bounded deployment privilege but cannot by itself deliver certificate-backed application identity.

C:

Workload identity federation exchanges trusted short-lived pipeline assertions for Azure access tokens without storing a client secret; certificate-backed application identity remains outside the responsibility of secretless Azure DevOps-to-Azure authentication.

D:

GitHub OIDC tokens can be trusted through a federated credential on an Entra application, enabling short-lived Azure tokens; that acts on short-lived GitHub cloud authentication, whereas the requested outcome is certificate-backed application identity.

Question 6

A lint workflow only reads source yet uses the default token with overly broad repository write access. What hardening should be added?

  1. Use runner groups for administrative boundaries
  2. Restrict GITHUB_TOKEN permissions
  3. Use GitHub Actions job needs for execution order
  4. Use a self-hosted GitHub runner for specialist hardware

Explanation

Correct Answer

B:

Declaring minimal permissions at workflow or job scope reduces the authority of the automatically issued GITHUB_TOKEN.

Incorrect Answers

A:

Runner groups can control which repositories may use a collection of organization or enterprise runners; least-privilege native workflow token cannot be inferred from scoped access to GitHub runner fleets alone.

C:

The needs key creates explicit GitHub Actions job dependencies so downstream jobs wait for required predecessors; least-privilege native workflow token cannot be delivered through dependency-ordered GitHub workflow jobs.

D:

Self-hosted runners execute jobs on administrator-managed machines where specialized devices and licensed tools can be installed; its effect is workflow access to custom hardware, not least-privilege native workflow token.

Question 7

One environment tracks multiple virtual machines, but a release should target only the payment service resource. What should the deployment job specify?

  1. Use maxParallel to cap matrix concurrency
  2. Use a server job for external approval orchestration
  3. Use a deployment environment resource reference
  4. Use a matrix strategy for independent test variants

Explanation

Correct Answer

C:

Environment resource selection narrows the deployment target while preserving environment-level history and checks.

Incorrect Answers

A:

maxParallel limits concurrent matrix legs to an explicit maximum, balancing test speed with available agent capacity; it contributes to capped test-matrix fanout, with per-resource deployment targeting still requiring its own control.

B:

Agentless server jobs execute supported orchestration tasks on the service, avoiding a long-running reserved worker for approval waits; this solves agentless approval waiting, leaving per-resource deployment targeting unresolved.

D:

A matrix strategy creates related job variants from configuration values, letting each variant run with its own parameters; it handles parameterized parallel test expansion but cannot by itself deliver per-resource deployment targeting.

Question 8

A reviewed feature contains dozens of temporary fixup commits, and the team wants one logical change recorded on main. Which completion approach fits?

  1. Squash commits when completing a pull request
  2. Maintain a release branch for supported fixes
  3. Use a hotfix branch from the production revision
  4. Use feature flags for incomplete trunk work

Explanation

Correct Answer

A:

Squash merging combines the pull request's commits into a single new commit on the target branch. The resulting mainline history records one reviewable feature change rather than preserving every interim fixup.

Incorrect Answers

B:

A release branch isolates version-specific stabilization and hotfixes without freezing ongoing development on main; although that supports parallel supported version maintenance, this scenario calls for one logical commit per reviewed feature.

C:

Branching from the deployed release commit isolates an urgent correction from unrelated unshipped changes; one logical commit per reviewed feature cannot be inferred from production-specific patch isolation alone.

D:

Feature flags gate runtime behavior independently from source integration, permitting frequent merges before release exposure; the distinction is hidden unfinished behavior on main versus one logical commit per reviewed feature.

Question 9

A release uses container artifacts and must enforce a security policy tied to artifact metadata before promotion. Which static check should be considered?

  1. Add an approval check to the production environment
  2. Configure deployment history through environment use
  3. Add a secure-file approval check
  4. Add an Evaluate artifact check

Explanation

Correct Answer

D:

Evaluate artifact checks assess supported artifact policy information before a stage may consume the protected resource.

Incorrect Answers

A:

Environment owners define approvals outside the pipeline YAML, so a stage consuming the protected environment must satisfy them; resource-owner-controlled human approval cannot substitute for predeployment artifact policy evaluation.

B:

Azure Pipelines environments record deployment job history and help connect runs with their target resources; predeployment artifact policy evaluation falls outside the scope of auditable deployment target history.

C:

A secure file can have an approval check that gates consumption even by an otherwise authorized pipeline; it contributes to human review of signing-file use, with predeployment artifact policy evaluation still requiring its own control.

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.

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