Microsoft AZ-400 Practice Test 21
Question 200
Before changing the pipeline or service, engineers find: An Azure Pipeline fails only on hosted agents because tests require an uninstalled legacy .NET SDK. Which evidence should the engineer inspect FIRST?
- Inspect global.json, agent image capabilities, use-dotnet steps and restore failures.
- Inspect connection policy, test-stage service connections, database logs and environment settings.
- Inspect task arguments, secret masking, logs, scope and token issuance.
- Review coverage collection filters, included assemblies and security-sensitive modules.
Explanation
Correct Answer
A:Inspect global.json, agent image capabilities, use-dotnet steps and restore failures. This directly checks the uncertain behavior or control before changing production. Test environments must provision declared toolchains rather than depend on developer machines. The resulting targeted action is: Install or select the approved SDK version in the pipeline before test execution.
Incorrect Answers
B:Inspect connection policy, test-stage service connections, database logs and environment settings. This would address a different situation, such as: Service unit tests pass but integration fails because Azure SQL connectivity differs between staging and production. In the present case, the most directly relevant evidence is: Inspect global.json, agent image capabilities, use-dotnet steps and restore failures. The crucial distinction is: Test environments must provision declared toolchains rather than depend on developer machines.
C:Inspect task arguments, secret masking, logs, scope and token issuance. This would address a different situation, such as: A test task writes its service principal secret into verbose logs on every failing run. In the present case, the most directly relevant evidence is: Inspect global.json, agent image capabilities, use-dotnet steps and restore failures. The crucial distinction is: Test environments must provision declared toolchains rather than depend on developer machines.
D:Review coverage collection filters, included assemblies and security-sensitive modules. This would address a different situation, such as: A team's claimed 90% code coverage includes only generated code and excludes its core authorization module. In the present case, the most directly relevant evidence is: Inspect global.json, agent image capabilities, use-dotnet steps and restore failures. The crucial distinction is: Test environments must provision declared toolchains rather than depend on developer machines.
Question 201
After implementing the change, the team verifies: A deployment workflow has a client secret in a variable group that is copied between projects and never rotated. Which result would BEST demonstrate that the issue is corrected?
- A test job cannot push code while an authorized publishing job retains needed access.
- An untrusted pipeline cannot use the production connection while approved release works.
- The app accesses its authorized container after the account key is revoked.
- The approved pipeline deploys after the static client secret is removed.
Explanation
Correct Answer
D:The approved pipeline deploys after the static client secret is removed. This measures the actual expected outcome, rather than trusting only a configuration flag. Implemented action: Adopt supported workload identity federation with least-privilege Azure scope. Federated workload identity can provide scoped short-lived Azure access without stored shared secrets.
Incorrect Answers
A:A test job cannot push code while an authorized publishing job retains needed access. This would address a different situation, such as: A GitHub Actions test workflow with untrusted input has contents:write even though it only runs tests. In the present case, the most directly relevant verification is: The approved pipeline deploys after the static client secret is removed. The crucial distinction is: Federated workload identity can provide scoped short-lived Azure access without stored shared secrets.
B:An untrusted pipeline cannot use the production connection while approved release works. This would address a different situation, such as: An Azure DevOps deployment service connection is authorized for all pipelines, including untrusted test definitions. In the present case, the most directly relevant verification is: The approved pipeline deploys after the static client secret is removed. The crucial distinction is: Federated workload identity can provide scoped short-lived Azure access without stored shared secrets.
C:The app accesses its authorized container after the account key is revoked. This would address a different situation, such as: An App Service accesses Azure Storage using a connection string containing an account key in source control. In the present case, the most directly relevant verification is: The approved pipeline deploys after the static client secret is removed. The crucial distinction is: Federated workload identity can provide scoped short-lived Azure access without stored shared secrets.
Question 202
A Microsoft DevOps team is addressing: A pull request passes security tests, then receives new commits but can merge without rerunning required checks. Which TWO complementary actions should be taken? Select TWO answers.
- Require fresh passing checks after updates to the protected pull request.
- Review reflogs, branch protections, merge strategy and downstream consumers.
- Inspect check run SHAs, policy settings, new commits and merge event history.
- Review deployment branch sources, permissions and branch policy coverage.
- Integrate incomplete code safely behind governed feature flags and short-lived branches.
Explanation
Correct Answers
A:Require fresh passing checks after updates to the protected pull request. This supplies the controlled implementation needed for the scenario. Its complementary step is: Inspect check run SHAs, policy settings, new commits and merge event history. Together they address: Required checks must apply to the head commit actually being merged.
C:Inspect check run SHAs, policy settings, new commits and merge event history. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Require fresh passing checks after updates to the protected pull request. Together they address: Required checks must apply to the head commit actually being merged.
Incorrect Answers
B:Review reflogs, branch protections, merge strategy and downstream consumers. This concerns a different DevOps situation: A maintainer rebases a shared release branch and force pushes, invalidating teammates' commit references. This case instead requires both a targeted investigation (Inspect check run SHAs, policy settings, new commits and merge event history.) and a controlled change (Require fresh passing checks after updates to the protected pull request.).
D:Review deployment branch sources, permissions and branch policy coverage. This concerns a different DevOps situation: A company protects main but permits unrestricted direct commits to an unprotected release branch deployed to production. This case instead requires both a targeted investigation (Inspect check run SHAs, policy settings, new commits and merge event history.) and a controlled change (Require fresh passing checks after updates to the protected pull request.).
E:Integrate incomplete code safely behind governed feature flags and short-lived branches. This concerns a different DevOps situation: A feature needs gradual rollout, but the team maintains a year-long divergent branch to hide unfinished functionality. This case instead requires both a targeted investigation (Inspect check run SHAs, policy settings, new commits and merge event history.) and a controlled change (Require fresh passing checks after updates to the protected pull request.).
Question 203
An Azure DevOps engineering team evaluates this condition: The same Git commit restores different NuGet package versions one week apart and intermittently fails tests. Which DevOps principle BEST explains the underlying weakness?
- Internal dependencies should be published to an authenticated, versioned package feed.
- Date-based versions need an unambiguous unique revision component and provenance.
- Package feed roles should separate consumer, publisher and administrative permissions.
- Reproducible builds require controlled package versions and lockfile inputs.
Explanation
Correct Answer
D:Reproducible builds require controlled package versions and lockfile inputs. This principle identifies the risk or delivery weakness in the case. Relevant evidence: Compare project version ranges, lockfiles, feed updates and restore output. An appropriate controlled response is: Pin approved package ranges with lockfiles and deterministic restore settings.
Incorrect Answers
A:Internal dependencies should be published to an authenticated, versioned package feed. This would address a different situation, such as: A.NET service pulls internal NuGet libraries from a developer laptop because no shared feed exists. In the present case, the most directly relevant principle is: Reproducible builds require controlled package versions and lockfile inputs. The crucial distinction is: Reproducible builds require controlled package versions and lockfile inputs.
B:Date-based versions need an unambiguous unique revision component and provenance. This would address a different situation, such as: An organization uses calendar-versioned nightly internal tools but deployments cannot distinguish two builds made on the same day. In the present case, the most directly relevant principle is: Reproducible builds require controlled package versions and lockfile inputs. The crucial distinction is: Reproducible builds require controlled package versions and lockfile inputs.
C:Package feed roles should separate consumer, publisher and administrative permissions. This would address a different situation, such as: Every developer can delete the versions of a private production library that other teams depend on. In the present case, the most directly relevant principle is: Reproducible builds require controlled package versions and lockfile inputs. The crucial distinction is: Reproducible builds require controlled package versions and lockfile inputs.
Question 204
Before changing the pipeline or service, engineers find: A critical production fix is committed to an old release branch and never reaches the mainline, so the bug returns next month. Which evidence should the engineer inspect FIRST?
- Inspect check run SHAs, policy settings, new commits and merge event history.
- Compare release branch commits, mainline history and subsequent deployment tags.
- Inspect merge cadence, branch age, conflict history and required checks.
- Inspect branch rules, bypass lists, review events and commit protections.
Explanation
Correct Answer
B:Compare release branch commits, mainline history and subsequent deployment tags. This directly checks the uncertain behavior or control before changing production. Hotfix processes must propagate tested corrections to every maintained affected line. The resulting targeted action is: Require reviewed back-merges or cherry-picks of hotfixes into active branches.
Incorrect Answers
A:Inspect check run SHAs, policy settings, new commits and merge event history. This would address a different situation, such as: A pull request passes security tests, then receives new commits but can merge without rerunning required checks. In the present case, the most directly relevant evidence is: Compare release branch commits, mainline history and subsequent deployment tags. The crucial distinction is: Hotfix processes must propagate tested corrections to every maintained affected line.
C:Inspect merge cadence, branch age, conflict history and required checks. This would address a different situation, such as: An organization merges changes only at the end of a six-week release branch, creating hundreds of conflicts. In the present case, the most directly relevant evidence is: Compare release branch commits, mainline history and subsequent deployment tags. The crucial distinction is: Hotfix processes must propagate tested corrections to every maintained affected line.
D:Inspect branch rules, bypass lists, review events and commit protections. This would address a different situation, such as: A repository's default branch allows authors to approve their own high-risk changes without independent review. In the present case, the most directly relevant evidence is: Compare release branch commits, mainline history and subsequent deployment tags. The crucial distinction is: Hotfix processes must propagate tested corrections to every maintained affected line.
Question 205
A Microsoft DevOps team is addressing: An internal library ships monthly but its changelog omits breaking changes unless one maintainer remembers to edit it. Which TWO complementary actions should be taken? Select TWO answers.
- Generate draft release notes from structured commits and require review of breaking changes.
- Keep technical runbooks alongside source changes with reviewed documentation checks.
- Store decisions in a protected repository with named reviewers and link them to implementation work.
- Route deployment and failure events to the approved Microsoft Teams operations channel.
- Review commit labels, semantic versions, pull request metadata and changelog history.
Explanation
Correct Answers
A:Generate draft release notes from structured commits and require review of breaking changes. This supplies the controlled implementation needed for the scenario. Its complementary step is: Review commit labels, semantic versions, pull request metadata and changelog history. Together they address: Release documentation should reconcile source changes with versioning and consumer impact.
E:Review commit labels, semantic versions, pull request metadata and changelog history. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Generate draft release notes from structured commits and require review of breaking changes. Together they address: Release documentation should reconcile source changes with versioning and consumer impact.
Incorrect Answers
B:Keep technical runbooks alongside source changes with reviewed documentation checks. This concerns a different DevOps situation: A repository wiki describes a build script that was removed six months ago and breaks onboarding. This case instead requires both a targeted investigation (Review commit labels, semantic versions, pull request metadata and changelog history.) and a controlled change (Generate draft release notes from structured commits and require review of breaking changes.).
C:Store decisions in a protected repository with named reviewers and link them to implementation work. This concerns a different DevOps situation: An architecture decision record is stored in a shared folder where anyone can overwrite approved design rationale without review. This case instead requires both a targeted investigation (Review commit labels, semantic versions, pull request metadata and changelog history.) and a controlled change (Generate draft release notes from structured commits and require review of breaking changes.).
D:Route deployment and failure events to the approved Microsoft Teams operations channel. This concerns a different DevOps situation: Critical production deployment failures send only email to an unattended shared mailbox. This case instead requires both a targeted investigation (Review commit labels, semantic versions, pull request metadata and changelog history.) and a controlled change (Generate draft release notes from structured commits and require review of breaking changes.).
Question 206
A Microsoft DevOps team is addressing: Critical production deployment failures send only email to an unattended shared mailbox. Which TWO complementary actions should be taken? Select TWO answers.
- Review OpenAPI specification, release artifact version and documentation publication stage.
- Store decisions in a protected repository with named reviewers and link them to implementation work.
- Review pipeline notification subscriptions, Teams integration, owners and incident escalation.
- Route deployment and failure events to the approved Microsoft Teams operations channel.
- Keep technical runbooks alongside source changes with reviewed documentation checks.
Explanation
Correct Answers
C:Review pipeline notification subscriptions, Teams integration, owners and incident escalation. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Route deployment and failure events to the approved Microsoft Teams operations channel. Together they address: Notifications should reach accountable responders through monitored channels with useful context.
D:Route deployment and failure events to the approved Microsoft Teams operations channel. This supplies the controlled implementation needed for the scenario. Its complementary step is: Review pipeline notification subscriptions, Teams integration, owners and incident escalation. Together they address: Notifications should reach accountable responders through monitored channels with useful context.
Incorrect Answers
A:Review OpenAPI specification, release artifact version and documentation publication stage. This concerns a different DevOps situation: A versioned REST API deploys successfully but its consumer documentation still lists removed fields. This case instead requires both a targeted investigation (Review pipeline notification subscriptions, Teams integration, owners and incident escalation.) and a controlled change (Route deployment and failure events to the approved Microsoft Teams operations channel.).
B:Store decisions in a protected repository with named reviewers and link them to implementation work. This concerns a different DevOps situation: An architecture decision record is stored in a shared folder where anyone can overwrite approved design rationale without review. This case instead requires both a targeted investigation (Review pipeline notification subscriptions, Teams integration, owners and incident escalation.) and a controlled change (Route deployment and failure events to the approved Microsoft Teams operations channel.).
E:Keep technical runbooks alongside source changes with reviewed documentation checks. This concerns a different DevOps situation: A repository wiki describes a build script that was removed six months ago and breaks onboarding. This case instead requires both a targeted investigation (Review pipeline notification subscriptions, Teams integration, owners and incident escalation.) and a controlled change (Route deployment and failure events to the approved Microsoft Teams operations channel.).
Question 207
A Microsoft DevOps team is addressing: A federated Azure identity accepts tokens from any branch in a public GitHub repository and can deploy production resources. Which TWO complementary actions should be taken? Select TWO answers.
- Inspect Key Vault version stages, runtime cache, rotation timeline and access policy.
- Inspect Entra federated credentials, GitHub workflow identity claims and Azure roles.
- Move cloud credential issuance into the guarded deployment job with scoped federation.
- Limit trust to an approved protected repository environment and least-privilege scope.
- Review certificate exposure, pipeline YAML, secure-file permissions and task usage.
Explanation
Correct Answers
B:Inspect Entra federated credentials, GitHub workflow identity claims and Azure roles. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Limit trust to an approved protected repository environment and least-privilege scope. Together they address: OIDC federation trust should restrict audience, issuer and repository/environment subject.
D:Limit trust to an approved protected repository environment and least-privilege scope. This supplies the controlled implementation needed for the scenario. Its complementary step is: Inspect Entra federated credentials, GitHub workflow identity claims and Azure roles. Together they address: OIDC federation trust should restrict audience, issuer and repository/environment subject.
Incorrect Answers
A:Inspect Key Vault version stages, runtime cache, rotation timeline and access policy. This concerns a different DevOps situation: An application release references a database secret version that was deleted during automatic rotation, causing downtime. This case instead requires both a targeted investigation (Inspect Entra federated credentials, GitHub workflow identity claims and Azure roles.) and a controlled change (Limit trust to an approved protected repository environment and least-privilege scope.).
C:Move cloud credential issuance into the guarded deployment job with scoped federation. This concerns a different DevOps situation: A GitHub environment is protected, but the deployment job obtains Azure credentials in an earlier unprotected build step. This case instead requires both a targeted investigation (Inspect Entra federated credentials, GitHub workflow identity claims and Azure roles.) and a controlled change (Limit trust to an approved protected repository environment and least-privilege scope.).
E:Review certificate exposure, pipeline YAML, secure-file permissions and task usage. This concerns a different DevOps situation: A mobile signing certificate is embedded as Base64 directly in a public pipeline YAML file. This case instead requires both a targeted investigation (Inspect Entra federated credentials, GitHub workflow identity claims and Azure roles.) and a controlled change (Limit trust to an approved protected repository environment and least-privilege scope.).
Question 208
A Microsoft DevOps team is addressing: A refactor changes a storage account name while the pipeline applies it directly to production. Which TWO complementary actions should be taken? Select TWO answers.
- Inspect Azure what-if operations, storage data dependency, naming constraints and resource references.
- Use secured remote state with least-privilege identity and locking support.
- Create a governed scoped exemption with an owner and expiry or redesign for compliance.
- Require reviewed what-if output and controlled data-preserving migration before deployment.
- Add explicit dependency and readiness checks where Azure role propagation needs validation.
Explanation
Correct Answers
A:Inspect Azure what-if operations, storage data dependency, naming constraints and resource references. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Require reviewed what-if output and controlled data-preserving migration before deployment. Together they address: Stateful IaC replacements require impact review and a migration plan.
D:Require reviewed what-if output and controlled data-preserving migration before deployment. This supplies the controlled implementation needed for the scenario. Its complementary step is: Inspect Azure what-if operations, storage data dependency, naming constraints and resource references. Together they address: Stateful IaC replacements require impact review and a migration plan.
Incorrect Answers
B:Use secured remote state with least-privilege identity and locking support. This concerns a different DevOps situation: A Terraform workflow stores its state file in an unencrypted shared file share accessible to all developers. This case instead requires both a targeted investigation (Inspect Azure what-if operations, storage data dependency, naming constraints and resource references.) and a controlled change (Require reviewed what-if output and controlled data-preserving migration before deployment.).
C:Create a governed scoped exemption with an owner and expiry or redesign for compliance. This concerns a different DevOps situation: A production deployment depends on a time-limited Azure Policy exemption that was never documented or reviewed. This case instead requires both a targeted investigation (Inspect Azure what-if operations, storage data dependency, naming constraints and resource references.) and a controlled change (Require reviewed what-if output and controlled data-preserving migration before deployment.).
E:Add explicit dependency and readiness checks where Azure role propagation needs validation. This concerns a different DevOps situation: A Bicep deployment creates an application before the required Key Vault access is effective, causing startup failures. This case instead requires both a targeted investigation (Inspect Azure what-if operations, storage data dependency, naming constraints and resource references.) and a controlled change (Require reviewed what-if output and controlled data-preserving migration before deployment.).
Question 209
Before changing the pipeline or service, engineers find: A low-volume payment failure disappears from diagnostic traces because sampling drops all relevant requests. Which evidence should the engineer inspect FIRST?
- Compare application failures, deployment annotations, version IDs and request telemetry.
- Inspect requests, dependencies, operation_Id values and time range.
- Inspect disk queue/latency, CPU utilization, memory pressure and workload profile.
- Inspect Application Insights sampling settings, exceptions, operation IDs and request volumes.
Explanation
Correct Answer
D:Inspect Application Insights sampling settings, exceptions, operation IDs and request volumes. This directly checks the uncertain behavior or control before changing production. Telemetry sampling strategy must preserve adequate signal for critical failures. The resulting targeted action is: Adjust sampling and critical-event retention within approved performance and cost limits.
Incorrect Answers
A:Compare application failures, deployment annotations, version IDs and request telemetry. This would address a different situation, such as: A new release increases HTTP 500s, but the team cannot match failures to deployment timestamps. In the present case, the most directly relevant evidence is: Inspect Application Insights sampling settings, exceptions, operation IDs and request volumes. The crucial distinction is: Telemetry sampling strategy must preserve adequate signal for critical failures.
B:Inspect requests, dependencies, operation_Id values and time range. This would address a different situation, such as: Application requests and dependency spans share an operation ID but engineers compare two unrelated totals instead of correlating affected calls. In the present case, the most directly relevant evidence is: Inspect Application Insights sampling settings, exceptions, operation IDs and request volumes. The crucial distinction is: Telemetry sampling strategy must preserve adequate signal for critical failures.
C:Inspect disk queue/latency, CPU utilization, memory pressure and workload profile. This would address a different situation, such as: An application slows while CPU is low but disk I/O is saturated; operators conclude more vCPUs are needed. In the present case, the most directly relevant evidence is: Inspect Application Insights sampling settings, exceptions, operation IDs and request volumes. The crucial distinction is: Telemetry sampling strategy must preserve adequate signal for critical failures.
Question 210
An Azure DevOps engineering team evaluates this condition: A microservice changes a JSON field name while a downstream consumer still relies on the old name. Which DevOps principle BEST explains the underlying weakness?
- Test stages must declare prerequisite environment and schema dependencies explicitly.
- Database deployment tests should validate backward compatibility throughout rollout.
- Consumer contract tests should detect interface-breaking changes before coordinated release.
- Security policy gates should prevent release of unapproved critical vulnerabilities.
Explanation
Correct Answer
C:Consumer contract tests should detect interface-breaking changes before coordinated release. This principle identifies the risk or delivery weakness in the case. Relevant evidence: Inspect producer schemas, consumer tests, artifact versions and failure logs. An appropriate controlled response is: Run automated producer-consumer contract checks with backward-compatible staging.
Incorrect Answers
A:Test stages must declare prerequisite environment and schema dependencies explicitly. This would address a different situation, such as: A pipeline starts integration tests before deploying the dependent database migration, causing intermittent failures. In the present case, the most directly relevant principle is: Consumer contract tests should detect interface-breaking changes before coordinated release. The crucial distinction is: Consumer contract tests should detect interface-breaking changes before coordinated release.
B:Database deployment tests should validate backward compatibility throughout rollout. This would address a different situation, such as: A release adds a non-null column while old and new application versions temporarily operate together. In the present case, the most directly relevant principle is: Consumer contract tests should detect interface-breaking changes before coordinated release. The crucial distinction is: Consumer contract tests should detect interface-breaking changes before coordinated release.
D:Security policy gates should prevent release of unapproved critical vulnerabilities. This would address a different situation, such as: A container image with a known critical vulnerability passes all unit tests and is promoted to production. In the present case, the most directly relevant principle is: Consumer contract tests should detect interface-breaking changes before coordinated release. The crucial distinction is: Consumer contract tests should detect interface-breaking changes before coordinated release.