Microsoft AZ-400 Practice Test 46
Question 450
The DevOps team must resolve this situation: A YAML pipeline references a production environment but deploys through an unprotected job that never uses the environment resource. Which engineering action is MOST appropriate?
- Use a deployment job bound to the protected environment and enforce resource checks.
- Optimize test partitions and concurrency to fit approved parallel job capacity.
- Create a controlled matrix over required operating systems and runtime versions.
- Expand path filters to cover the service and relevant shared library changes.
Explanation
Correct Answer
A:Use a deployment job bound to the protected environment and enforce resource checks. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: An unauthorized run cannot access the production deployment until approval completes. Environment approvals apply only when pipelines use the protected deployment resource correctly.
Incorrect Answers
B:Optimize test partitions and concurrency to fit approved parallel job capacity. This would address a different situation, such as: A large repository launches 100 independent test jobs though the organization owns only 10 paid parallel agent slots. In the present case, the most directly relevant engineering action is: Use a deployment job bound to the protected environment and enforce resource checks. The crucial distinction is: Environment approvals apply only when pipelines use the protected deployment resource correctly.
C:Create a controlled matrix over required operating systems and runtime versions. This would address a different situation, such as: A cross-platform CLI is built only on Windows and fails later when customers run it on Linux. In the present case, the most directly relevant engineering action is: Use a deployment job bound to the protected environment and enforce resource checks. The crucial distinction is: Environment approvals apply only when pipelines use the protected deployment resource correctly.
D:Expand path filters to cover the service and relevant shared library changes. This would address a different situation, such as: A monorepo pipeline skips tests for a common authentication library because its paths filter only includes one service folder. In the present case, the most directly relevant engineering action is: Use a deployment job bound to the protected environment and enforce resource checks. The crucial distinction is: Environment approvals apply only when pipelines use the protected deployment resource correctly.
Question 451
An Azure DevOps engineering team evaluates this condition: Six teams manually create nearly identical VNets with inconsistent NSG defaults and missing diagnostics. Which DevOps principle BEST explains the underlying weakness?
- Deployment mode and scope determine whether absent resources may be removed.
- IaC modules should centralize approved reusable infrastructure patterns.
- Policy exemptions need justified owner approval, scope and expiration.
- IaC builds need controlled provider requirements and lockfile provenance.
Explanation
Correct Answer
B:IaC modules should centralize approved reusable infrastructure patterns. This principle identifies the risk or delivery weakness in the case. Relevant evidence: Inspect existing VNet templates, module interfaces, policy results and configuration drift. An appropriate controlled response is: Publish a versioned Bicep networking module with secure defaults and reviewed parameters.
Incorrect Answers
A:Deployment mode and scope determine whether absent resources may be removed. This would address a different situation, such as: A deployment pipeline uses complete mode unintentionally and deletes resources omitted from an updated ARM template. In the present case, the most directly relevant principle is: IaC modules should centralize approved reusable infrastructure patterns. The crucial distinction is: IaC modules should centralize approved reusable infrastructure patterns.
C:Policy exemptions need justified owner approval, scope and expiration. This would address a different situation, such as: A production deployment depends on a time-limited Azure Policy exemption that was never documented or reviewed. In the present case, the most directly relevant principle is: IaC modules should centralize approved reusable infrastructure patterns. The crucial distinction is: IaC modules should centralize approved reusable infrastructure patterns.
D:IaC builds need controlled provider requirements and lockfile provenance. This would address a different situation, such as: The same Terraform source yields changed resource behavior because local users and CI select different provider versions. In the present case, the most directly relevant principle is: IaC modules should centralize approved reusable infrastructure patterns. The crucial distinction is: IaC modules should centralize approved reusable infrastructure patterns.
Question 452
An Azure DevOps engineering team evaluates this condition: A team reports excellent developer experience based only on responses from its three most active maintainers. Which DevOps principle BEST explains the underlying weakness?
- Security metrics should track severity, exposure, accountable ownership and aging.
- Delivery optimization needs separate measurements for queue, execution and waiting stages.
- Flow metrics depend on consistent state-transition definitions and truthful process data.
- Process metrics should disclose sampling limitations and actionable qualitative context.
Explanation
Correct Answer
D:Process metrics should disclose sampling limitations and actionable qualitative context. This principle identifies the risk or delivery weakness in the case. Relevant evidence: Inspect survey population, response rates, roles and unanswered groups. An appropriate controlled response is: Gather representative developer feedback and combine it with observed flow telemetry.
Incorrect Answers
A:Security metrics should track severity, exposure, accountable ownership and aging. This would address a different situation, such as: A security scorecard shows the total number of alerts but cannot identify overdue critical fixes. In the present case, the most directly relevant principle is: Process metrics should disclose sampling limitations and actionable qualitative context. The crucial distinction is: Process metrics should disclose sampling limitations and actionable qualitative context.
B:Delivery optimization needs separate measurements for queue, execution and waiting stages. This would address a different situation, such as: A pipeline takes 50 minutes, but dashboard owners cannot distinguish runner queue delays from actual build execution. In the present case, the most directly relevant principle is: Process metrics should disclose sampling limitations and actionable qualitative context. The crucial distinction is: Process metrics should disclose sampling limitations and actionable qualitative context.
C:Flow metrics depend on consistent state-transition definitions and truthful process data. This would address a different situation, such as: Azure Boards reports near-zero cycle time because teams move stories to Active only when coding is almost finished. In the present case, the most directly relevant principle is: Process metrics should disclose sampling limitations and actionable qualitative context. The crucial distinction is: Process metrics should disclose sampling limitations and actionable qualitative context.
Question 453
An Azure DevOps engineering team evaluates this condition: A GitHub Actions workflow receives 403 when installing a private package owned by another organization repository. Which DevOps principle BEST explains the underlying weakness?
- Private package access requires scoped workflow identity and authorized repository permissions.
- Versioned universal packages provide reproducible distribution of nonlanguage build outputs.
- Retention must preserve artifacts and dependencies required for defined rollback windows.
- Reproducible builds require controlled package versions and lockfile inputs.
Explanation
Correct Answer
A:Private package access requires scoped workflow identity and authorized repository permissions. This principle identifies the risk or delivery weakness in the case. Relevant evidence: Inspect package visibility, repository grant, GITHUB_TOKEN permissions and workflow context. An appropriate controlled response is: Authorize the consuming repository and assign minimum packages:read access.
Incorrect Answers
B:Versioned universal packages provide reproducible distribution of nonlanguage build outputs. This would address a different situation, such as: An organization distributes a proprietary CLI as email attachments so engineering teams run inconsistent versions. In the present case, the most directly relevant principle is: Private package access requires scoped workflow identity and authorized repository permissions. The crucial distinction is: Private package access requires scoped workflow identity and authorized repository permissions.
C:Retention must preserve artifacts and dependencies required for defined rollback windows. This would address a different situation, such as: Release rollback fails because the pipeline cleaned the package version deployed last week. In the present case, the most directly relevant principle is: Private package access requires scoped workflow identity and authorized repository permissions. The crucial distinction is: Private package access requires scoped workflow identity and authorized repository permissions.
D:Reproducible builds require controlled package versions and lockfile inputs. This would address a different situation, such as: The same Git commit restores different NuGet package versions one week apart and intermittently fails tests. In the present case, the most directly relevant principle is: Private package access requires scoped workflow identity and authorized repository permissions. The crucial distinction is: Private package access requires scoped workflow identity and authorized repository permissions.
Question 454
An engineering design review identifies: A shared Bicep deployment creates a new Log Analytics workspace on each run due to non-deterministic resource names. Which shortcut should the team MOST specifically avoid for this case?
- Rely on a resource tag named secure as proof of OS baseline enforcement.
- Duplicate a fragile inline script and customize it without peer review.
- Generate a new random resource name on each redeployment.
- Use an image named latest with no release reference in the environment.
Explanation
Correct Answer
C:Generate a new random resource name on each redeployment. This shortcut directly undermines the stated control or workflow. A safer action is: Use deterministic names and scope-aware existing resource references. Explanation: Declarative deployments should converge to consistent named resources across repeated runs.
Incorrect Answers
A:Rely on a resource tag named secure as proof of OS baseline enforcement. This would address a different situation, such as: Production VMs are configured by manual shell changes and new replacement VMs lack required OS baselines. In the present case, the most directly relevant unsafe shortcut is: Generate a new random resource name on each redeployment. The crucial distinction is: Declarative deployments should converge to consistent named resources across repeated runs.
B:Duplicate a fragile inline script and customize it without peer review. This would address a different situation, such as: Each team's pipeline provisions Azure Container Apps independently, with inconsistent health probes and identity. In the present case, the most directly relevant unsafe shortcut is: Generate a new random resource name on each redeployment. The crucial distinction is: Declarative deployments should converge to consistent named resources across repeated runs.
D:Use an image named latest with no release reference in the environment. This would address a different situation, such as: Application images are deployed manually after infra provisioning and the deployed image tag is not recorded in Bicep or the release pipeline. In the present case, the most directly relevant unsafe shortcut is: Generate a new random resource name on each redeployment. The crucial distinction is: Declarative deployments should converge to consistent named resources across repeated runs.
Question 455
The DevOps team must resolve this situation: A shopping application logs HTTP failures but does not show which downstream payment call caused the response delay. Which engineering action is MOST appropriate?
- Instrument supported Application Insights distributed tracing with context propagation.
- Enable supported AKS container telemetry with resource labels and actionable alerts.
- Configure supported VM Insights or guest-memory collection and meaningful alerts.
- Enable an approved connection monitor for the critical private network path.
Explanation
Correct Answer
A:Instrument supported Application Insights distributed tracing with context propagation. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: A slow payment request appears as a correlated downstream dependency span. Distributed telemetry should correlate requests and dependencies across application boundaries.
Incorrect Answers
B:Enable supported AKS container telemetry with resource labels and actionable alerts. This would address a different situation, such as: AKS pods restart frequently but the team captures only the last running pod's console output. In the present case, the most directly relevant engineering action is: Instrument supported Application Insights distributed tracing with context propagation. The crucial distinction is: Distributed telemetry should correlate requests and dependencies across application boundaries.
C:Configure supported VM Insights or guest-memory collection and meaningful alerts. This would address a different situation, such as: A production VM experiences OOM kills while CPU remains normal and default platform graphs show no guest memory usage. In the present case, the most directly relevant engineering action is: Instrument supported Application Insights distributed tracing with context propagation. The crucial distinction is: Distributed telemetry should correlate requests and dependencies across application boundaries.
D:Enable an approved connection monitor for the critical private network path. This would address a different situation, such as: Intermittent API failures occur across a private network, but monitoring uses only application exception counts. In the present case, the most directly relevant engineering action is: Instrument supported Application Insights distributed tracing with context propagation. The crucial distinction is: Distributed telemetry should correlate requests and dependencies across application boundaries.
Question 456
A Microsoft DevOps team is addressing: An Azure Pipeline fails only on hosted agents because tests require an uninstalled legacy .NET SDK. Which TWO complementary actions should be taken? Select TWO answers.
- Inspect global.json, agent image capabilities, use-dotnet steps and restore failures.
- Install or select the approved SDK version in the pipeline before test execution.
- Add a risk-based container vulnerability scan gate before deployment approval.
- Inspect producer schemas, consumer tests, artifact versions and failure logs.
- Use a dedicated test subscription or resource group with restricted identity permissions.
Explanation
Correct Answers
A:Inspect global.json, agent image capabilities, use-dotnet steps and restore failures. This supplies the diagnosis/evidence needed for the scenario. Its complementary step is: Install or select the approved SDK version in the pipeline before test execution. Together they address: Test environments must provision declared toolchains rather than depend on developer machines.
B:Install or select the approved SDK version in the pipeline before test execution. This supplies the controlled implementation needed for the scenario. Its complementary step is: Inspect global.json, agent image capabilities, use-dotnet steps and restore failures. Together they address: Test environments must provision declared toolchains rather than depend on developer machines.
Incorrect Answers
C:Add a risk-based container vulnerability scan gate before deployment approval. This concerns a different DevOps situation: A container image with a known critical vulnerability passes all unit tests and is promoted to production. This case instead requires both a targeted investigation (Inspect global.json, agent image capabilities, use-dotnet steps and restore failures.) and a controlled change (Install or select the approved SDK version in the pipeline before test execution.).
D:Inspect producer schemas, consumer tests, artifact versions and failure logs. This concerns a different DevOps situation: A microservice changes a JSON field name while a downstream consumer still relies on the old name. This case instead requires both a targeted investigation (Inspect global.json, agent image capabilities, use-dotnet steps and restore failures.) and a controlled change (Install or select the approved SDK version in the pipeline before test execution.).
E:Use a dedicated test subscription or resource group with restricted identity permissions. This concerns a different DevOps situation: A test pipeline reuses a production storage account and occasionally deletes customer fixtures. This case instead requires both a targeted investigation (Inspect global.json, agent image capabilities, use-dotnet steps and restore failures.) and a controlled change (Install or select the approved SDK version in the pipeline before test execution.).
Question 457
The DevOps team must resolve this situation: A deployment workflow has a client secret in a variable group that is copied between projects and never rotated. Which engineering action is MOST appropriate?
- Adopt supported workload identity federation with least-privilege Azure scope.
- Attach an approved user-assigned managed identity to the participating compute resources.
- Enable system-assigned managed identity and grant narrow storage data-plane roles.
- Set minimum GITHUB_TOKEN permissions for each job and restrict untrusted execution.
Explanation
Correct Answer
A:Adopt supported workload identity federation with least-privilege Azure scope. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: The approved pipeline deploys after the static client secret is removed. Federated workload identity can provide scoped short-lived Azure access without stored shared secrets.
Incorrect Answers
B:Attach an approved user-assigned managed identity to the participating compute resources. This would address a different situation, such as: An autoscaled deployment needs consistent identity across short-lived Azure compute instances that are replaced frequently. In the present case, the most directly relevant engineering action is: Adopt supported workload identity federation with least-privilege Azure scope. The crucial distinction is: Federated workload identity can provide scoped short-lived Azure access without stored shared secrets.
C:Enable system-assigned managed identity and grant narrow storage data-plane roles. 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 engineering action is: Adopt supported workload identity federation with least-privilege Azure scope. The crucial distinction is: Federated workload identity can provide scoped short-lived Azure access without stored shared secrets.
D:Set minimum GITHUB_TOKEN permissions for each job and restrict untrusted execution. 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 engineering action is: Adopt supported workload identity federation with least-privilege Azure scope. The crucial distinction is: Federated workload identity can provide scoped short-lived Azure access without stored shared secrets.
Question 458
After implementing the change, the team verifies: A developer accidentally commits a cloud token, but the repository has no automated alerting on leaked credentials. Which result would BEST demonstrate that the issue is corrected?
- A harmless test token pattern triggers the expected prevention or review workflow.
- A policy-incompatible dependency prevents publication until disposition.
- A known critical test image is blocked while a remediated digest deploys.
- A package from an unapproved registry fails the review despite passing unit tests.
Explanation
Correct Answer
A:A harmless test token pattern triggers the expected prevention or review workflow. This measures the actual expected outcome, rather than trusting only a configuration flag. Implemented action: Enable authorized secret scanning and push protection, then rotate exposed credentials. Secret scanning should detect exposed credentials and trigger prompt containment.
Incorrect Answers
B:A policy-incompatible dependency prevents publication until disposition. This would address a different situation, such as: A binary distribution uses open-source dependencies but its release process does not check license obligations. In the present case, the most directly relevant verification is: A harmless test token pattern triggers the expected prevention or review workflow. The crucial distinction is: Secret scanning should detect exposed credentials and trigger prompt containment.
C:A known critical test image is blocked while a remediated digest deploys. This would address a different situation, such as: An ACR pipeline pushes vulnerable base images and deploys without considering scan results. In the present case, the most directly relevant verification is: A harmless test token pattern triggers the expected prevention or review workflow. The crucial distinction is: Secret scanning should detect exposed credentials and trigger prompt containment.
D:A package from an unapproved registry fails the review despite passing unit tests. This would address a different situation, such as: A dependency update workflow proposes a new package version but its artifact origin is not recorded, weakening supply-chain review. In the present case, the most directly relevant verification is: A harmless test token pattern triggers the expected prevention or review workflow. The crucial distinction is: Secret scanning should detect exposed credentials and trigger prompt containment.
Question 459
The DevOps team must resolve this situation: A project relies entirely on container image vulnerability scanning while application source contains an authorization flaw. Which engineering action is MOST appropriate?
- Enable supported secret, dependency and code scanning for target Azure Repos repositories.
- Integrate image vulnerability scanning and a reviewed enforcement gate before production.
- Combine appropriate code, dependency, secret and container scanning with tested authorization scenarios.
- Use risk-based triage with owners, remediation SLAs and documented waivers.
Explanation
Correct Answer
C:Combine appropriate code, dependency, secret and container scanning with tested authorization scenarios. This action addresses the specific failure or requirement and preserves delivery controls. Validation criterion: The known authorization weakness is identified despite a clean base-image scan. Different scanning methods cover different classes of weakness and require complementary controls.
Incorrect Answers
A:Enable supported secret, dependency and code scanning for target Azure Repos repositories. This would address a different situation, such as: An Azure Repos project has GitHub Advanced Security licensed but required code and secret scanning were never enabled for key repos. In the present case, the most directly relevant engineering action is: Combine appropriate code, dependency, secret and container scanning with tested authorization scenarios. The crucial distinction is: Different scanning methods cover different classes of weakness and require complementary controls.
B:Integrate image vulnerability scanning and a reviewed enforcement gate before production. This would address a different situation, such as: An ACR pipeline pushes vulnerable base images and deploys without considering scan results. In the present case, the most directly relevant engineering action is: Combine appropriate code, dependency, secret and container scanning with tested authorization scenarios. The crucial distinction is: Different scanning methods cover different classes of weakness and require complementary controls.
D:Use risk-based triage with owners, remediation SLAs and documented waivers. This would address a different situation, such as: Hundreds of low-severity dependency alerts crowd out a critical exploitable issue in production. In the present case, the most directly relevant engineering action is: Combine appropriate code, dependency, secret and container scanning with tested authorization scenarios. The crucial distinction is: Different scanning methods cover different classes of weakness and require complementary controls.
Question 460
Before changing the pipeline or service, engineers find: An Azure DevOps pipeline uses a GitHub repository but cannot run pull-request validation because its repository connection is misconfigured. Which evidence should the engineer inspect FIRST?
- Review stage condition expressions, dependency status and test results.
- Inspect task output names, stage dependencies and variable references.
- Inspect repository runner group rules, fork workflow triggers and credential persistence.
- Inspect GitHub App installation, service connection, YAML PR settings and branch policy.
Explanation
Correct Answer
D:Inspect GitHub App installation, service connection, YAML PR settings and branch policy. This directly checks the uncertain behavior or control before changing production. Azure Pipelines GitHub integration requires scoped access and appropriate PR triggers. The resulting targeted action is: Configure approved GitHub connection permissions and required PR build validation.
Incorrect Answers
A:Review stage condition expressions, dependency status and test results. This would address a different situation, such as: A post-deployment verification job runs even when staging tests fail because its condition overrides the default dependency check. In the present case, the most directly relevant evidence is: Inspect GitHub App installation, service connection, YAML PR settings and branch policy. The crucial distinction is: Azure Pipelines GitHub integration requires scoped access and appropriate PR triggers.
B:Inspect task output names, stage dependencies and variable references. This would address a different situation, such as: A downstream stage cannot determine the storage endpoint created by an infrastructure provisioning stage. In the present case, the most directly relevant evidence is: Inspect GitHub App installation, service connection, YAML PR settings and branch policy. The crucial distinction is: Azure Pipelines GitHub integration requires scoped access and appropriate PR triggers.
C:Inspect repository runner group rules, fork workflow triggers and credential persistence. This would address a different situation, such as: A GitHub self-hosted runner accepts workflows from untrusted forks and shares its workspace with production credentials. In the present case, the most directly relevant evidence is: Inspect GitHub App installation, service connection, YAML PR settings and branch policy. The crucial distinction is: Azure Pipelines GitHub integration requires scoped access and appropriate PR triggers.