Microsoft AZ-400 Practice Test Questions and Exam Dumps Part 16 Q301-320

View Full Microsoft AZ-400 Exam Dumps and Practice Test Dumps

 

Q301. Which Azure DevOps feature can automatically enforce that certain reviewers approve changes to specific files or folders?

1) Pipeline caching
2) Required reviewers
3) Agent pools
4) Artifact feeds

Correct Answer: 2)

Explanation:

Required reviewers can be configured to ensure that designated users or groups review changes affecting particular areas of a repository. This is especially useful when certain directories contain sensitive infrastructure, security configurations, or deployment definitions that require specialized approval. When a pull request modifies those files, the configured reviewers can be automatically added or required before the change can be completed. This provides stronger governance and helps ensure that important changes receive appropriate technical oversight. Pipeline caching, agent pools, and artifact feeds provide different capabilities and do not enforce file-specific review requirements. Therefore, required reviewers are the appropriate Azure DevOps feature for this scenario.

Q302. A team wants to prevent a pull request from being completed until automated validation succeeds. Which feature should be configured?

1) Build validation policy
2) Git tag
3) Variable group
4) Service hook

Correct Answer: 1)

Explanation:

A build validation policy can require an automated build or pipeline to run successfully before a pull request can be completed. This helps ensure that proposed code changes compile correctly and pass configured automated checks before they are merged into the protected branch. The validation pipeline can include unit tests, code analysis, security checks, and other quality controls. This approach reduces the likelihood of introducing broken code into the main development branch. Git tags identify specific repository versions, variable groups store reusable configuration values, and service hooks integrate events with external services. Therefore, build validation is the appropriate feature for enforcing successful automated validation.

Q303. What is the primary purpose of Azure DevOps branch policies?

1) Increase storage capacity
2) Manage container registries
3) Protect important branches with development rules
4) Monitor application availability

Correct Answer: 3)

Explanation:

Azure DevOps branch policies help protect important branches by enforcing development and review requirements before changes can be merged. Policies can require pull requests, reviewer approvals, successful builds, comment resolution, and other conditions. They are commonly applied to branches such as main or release branches where stability is important. By establishing these controls, teams can improve code quality and reduce accidental or unreviewed changes. Branch policies are not intended to increase storage, manage container registries, or monitor application availability. Those tasks are handled by different Azure services and DevOps capabilities. Therefore, protecting important branches with development rules is the primary purpose of branch policies.

Q304. Which Git strategy is generally recommended for integrating a small completed change from one branch into another specific branch?

1) Git reset –hard
2) Git clean
3) Git cherry-pick
4) Git clone

Correct Answer: 3)

Explanation:

Git cherry-pick allows a specific commit from one branch to be applied to another branch. It is useful when a team needs to bring one targeted fix or change into a different branch without merging the entire source branch. For example, a critical bug fix committed to a development branch may need to be applied separately to a release branch. Cherry-picking should be used carefully because it can create duplicate commits and may require conflict resolution. git reset, git clean, and git clone serve different purposes. Therefore, when a specific existing commit needs to be applied independently to another branch, cherry-pick is appropriate.

Q305. Which practice helps keep Git branches easier to review and merge in a DevOps workflow?

1) Creating very long-lived feature branches
2) Making small, focused commits
3) Avoiding pull requests
4) Combining unrelated changes into one commit

Correct Answer: 2)

Explanation:

Small, focused commits make changes easier to understand, review, test, and troubleshoot. When each commit represents a logical change, reviewers can more easily determine what was modified and why. Smaller changes also reduce the likelihood of complicated merge conflicts and make it easier to identify the source of a problem when something fails. Long-lived branches and large commits containing unrelated modifications can increase integration complexity. Pull requests should generally remain part of the review process because they provide visibility and collaboration. Therefore, making small, focused commits is a useful Git practice for improving maintainability and supporting an efficient DevOps workflow.

Q306. Which Azure DevOps capability provides a visual way to organize work items according to their current workflow state?

1) Azure Boards Kanban board
2) Azure Artifacts
3) Azure Repos tags
4) Azure Pipelines agents

Correct Answer: 1)

Explanation:

Azure Boards Kanban boards provide a visual representation of work items as they move through workflow states such as New, Active, Resolved, and Done. Teams can use the board to understand current work, identify bottlenecks, and manage workflow more effectively. Cards can be moved between columns as work progresses, providing an easy-to-understand view of project status. Azure Artifacts focuses on package management, Azure Repos provides source control, and pipeline agents execute automated jobs. These services do not provide the same visual work-management functionality. Therefore, an Azure Boards Kanban board is the appropriate capability for visually organizing work according to workflow state.

Q307. A team wants to limit how many work items can be actively worked on at the same time. Which Kanban concept should they use?

1) Release tags
2) Work-in-progress limits
3) Pipeline variables
4) Deployment slots

Correct Answer: 2)

Explanation:

Work-in-progress, or WIP, limits restrict the number of work items that can simultaneously exist in a particular workflow state. The purpose is to prevent teams from starting too much work at once and leaving many tasks partially completed. By limiting active work, teams can focus on completing existing tasks, identify bottlenecks, and improve overall flow. WIP limits are a core Kanban practice and support continuous improvement by making workflow constraints visible. Pipeline variables, release tags, and deployment slots address different DevOps concerns. Therefore, when a team wants to control how much work is actively being processed, WIP limits are the appropriate concept.

Q308. Which DevOps metric measures the percentage of deployments that result in a failure requiring remediation or recovery?

1) Deployment frequency
2) Lead time for changes
3) Change failure rate
4) Mean time to restore

Correct Answer: 3)

Explanation:

Change failure rate measures the proportion of deployments or changes that result in failures requiring remediation, rollback, hotfixes, or other corrective action. It is one of the commonly used DevOps delivery performance indicators. A lower change failure rate generally indicates that changes are being delivered with greater reliability. Deployment frequency measures how often deployments occur, lead time for changes measures how long changes take to move through delivery, and mean time to restore measures recovery speed after a service disruption. Therefore, when the goal is to measure how frequently deployments cause failures requiring corrective action, change failure rate is the correct metric.

Q309. Which metric measures how quickly a team can recover from a production incident or service disruption?

1) Mean time to restore
2) Deployment frequency
3) Code coverage
4) Work-in-progress

Correct Answer: 1)

Explanation:

Mean time to restore, commonly abbreviated MTTR, measures how quickly a team restores normal service after an incident or failure. A lower MTTR generally indicates that an organization can detect, diagnose, and recover from operational problems efficiently. Teams can improve this metric through monitoring, automated deployment mechanisms, rollback strategies, incident response procedures, and well-documented runbooks. Deployment frequency measures release frequency, code coverage measures how much code is exercised by tests, and WIP measures active work in a workflow. Therefore, when evaluating how quickly a team recovers from production disruptions, mean time to restore is the appropriate metric.

Q310. What is a key benefit of using automated rollback capabilities in a deployment pipeline?

1) They eliminate all testing requirements
2) They increase the number of code defects
3) They help restore a previously working version quickly
4) They prevent all configuration changes

Correct Answer: 3)

Explanation:

Automated rollback capabilities can quickly return an application to a previously validated version when a deployment causes unexpected problems. This reduces the time required to restore service and can limit the impact of a failed release. Rollback strategies are particularly useful in continuous delivery environments where deployments occur frequently and recovery speed is important. However, rollback does not eliminate the need for testing or guarantee that every failure can be automatically resolved. Teams should also investigate the underlying issue after service has been restored. Therefore, the key benefit is the ability to quickly restore a known working version when a deployment introduces a problem.

Q311. Which Azure DevOps feature allows a pipeline to reuse a common YAML definition across multiple pipelines?

1) Pipeline templates
2) Git tags
3) Work items
4) Release annotations

Correct Answer: 1)

Explanation:

Pipeline templates allow teams to define reusable YAML sections that can be incorporated into multiple Azure Pipelines. Templates can contain common jobs, stages, steps, variables, or other pipeline structures. This reduces duplication and helps organizations standardize CI/CD processes across repositories and applications. When a common process needs to change, updating the shared template can make the improvement available to pipelines that consume it. Git tags, work items, and release annotations serve different purposes and do not provide reusable YAML pipeline definitions. Therefore, pipeline templates are the appropriate Azure DevOps capability for creating reusable pipeline logic and promoting consistency.

Q312. What is a major advantage of storing pipeline definitions in source control?

1) It prevents all deployment failures
2) It provides version history and change tracking
3) It eliminates the need for testing
4) It automatically creates cloud resources

Correct Answer: 2)

Explanation:

Storing pipeline definitions in source control provides version history, review capabilities, and traceability for CI/CD configuration changes. Teams can see who modified a pipeline, review changes through pull requests, compare previous versions, and restore earlier definitions when necessary. This treats pipeline configuration as code and applies familiar development practices to automation. Source control does not automatically prevent deployment failures, remove the need for testing, or create cloud resources by itself. However, it improves the reliability and maintainability of pipeline configuration by making changes visible and reversible. Therefore, version history and change tracking are major benefits of storing pipeline definitions in source control.

Q313. Which Azure DevOps feature can store reusable non-secret configuration values for use across multiple pipelines?

1) Variable groups
2) Pull requests
3) Git commits
4) Test plans

Correct Answer: 1)

Explanation:

Variable groups allow teams to store sets of variables that can be reused across multiple pipelines. They are useful for maintaining common configuration values such as environment names, URLs, or other shared settings. Variable groups can also contain secrets when appropriately configured, although sensitive values should be protected and managed carefully. Using shared variables reduces duplication and makes pipeline configuration easier to maintain. Pull requests manage code review, Git commits record repository changes, and test plans organize testing activities. Therefore, variable groups are the appropriate Azure DevOps capability when reusable configuration values need to be shared across multiple pipeline definitions.

Q314. Which deployment approach exposes a new application version to a small percentage of users before expanding the rollout?

1) Big-bang deployment
2) Canary deployment
3) Full replacement deployment
4) Manual file copying

Correct Answer: 2)

Explanation:

A canary deployment introduces a new application version to a limited percentage of users or traffic before expanding it to the wider population. Teams can monitor application performance, errors, and user behavior during the limited rollout. If problems are detected, the rollout can be stopped or reversed before affecting all users. This reduces deployment risk compared with immediately exposing every user to the new version. Canary strategies are particularly useful for applications where production validation is important. A big-bang or full replacement deployment does not provide the same gradual exposure. Therefore, canary deployment is the appropriate strategy for controlled incremental releases.

Q315. Which practice helps reduce the risk of exposing credentials through pipeline logs?

1) Printing all variables during every build
2) Storing secrets in source-controlled YAML files
3) Using secret variables and avoiding secret output
4) Adding credentials to command-line arguments without protection

Correct Answer: 3)

Explanation:

Secret variables and secure secret-management practices help prevent credentials from being unnecessarily exposed in pipeline logs. Sensitive values should be stored using appropriate protected mechanisms and should never be intentionally printed during pipeline execution. Teams should also avoid embedding passwords, tokens, or keys directly in source-controlled YAML files. Pipeline tasks should use secure references to credentials and ensure that command output does not reveal them. Simply hiding credentials in ordinary configuration files is insufficient because repository access may expose those values. Therefore, using secret variables or dedicated secret-management services while preventing secret output is an important DevSecOps practice for protecting credentials.

Q316. What is the primary purpose of Azure Key Vault in a CI/CD environment?

1) Store and protect secrets, keys, and certificates
2) Host Git repositories
3) Execute unit tests
4) Manage work-item boards

Correct Answer: 1)

Explanation:

Azure Key Vault is designed to securely store and manage sensitive information such as secrets, cryptographic keys, and certificates. In CI/CD environments, it can help prevent credentials from being embedded directly in source code or pipeline definitions. Pipelines can retrieve required secrets through controlled authentication and authorization mechanisms, allowing applications and deployment processes to access sensitive information without exposing it unnecessarily. Key Vault does not host Git repositories, execute unit tests, or manage work-item boards. Those functions are provided by other services. Therefore, securely storing and managing secrets, keys, and certificates is the primary purpose of Azure Key Vault.

Q317. Which security principle should be applied when configuring a service connection used by a deployment pipeline?

1) Grant every available permission
2) Use the principle of least privilege
3) Share administrator credentials with developers
4) Disable authentication controls

Correct Answer: 2)

Explanation:

The principle of least privilege means that a service connection should receive only the permissions necessary to perform its intended deployment tasks. Granting excessive permissions increases the potential impact if credentials are compromised or a pipeline is misconfigured. For example, a deployment identity that only needs access to a specific resource group should not automatically receive broad administrative permissions across an entire subscription. Least privilege should be combined with secure credential handling, auditing, and appropriate authorization controls. Sharing administrator credentials or disabling authentication significantly increases security risk. Therefore, applying least privilege is the recommended approach when configuring pipeline service connections.

Q318. What is the purpose of integrating security checks early in the software development lifecycle?

1) Delay security testing until production
2) Shift security activities earlier in development
3) Remove the need for code review
4) Prevent developers from using source control

Correct Answer: 2)

Explanation:

Integrating security checks early in development is commonly described as shifting security left. The goal is to identify vulnerabilities, insecure dependencies, configuration problems, and coding issues before software reaches later stages of the delivery process. Early detection usually makes security problems easier and less expensive to remediate because developers can address them while changes are still being developed. Security checks can include static analysis, dependency scanning, secret detection, infrastructure validation, and container image scanning. Shifting security left does not remove code review or source control. Instead, it integrates security into existing development and CI/CD practices so security becomes a continuous part of delivery.

Q319. Which testing approach verifies that multiple application components work correctly together?

1) Unit testing
2) Integration testing
3) Static code formatting
4) License scanning

Correct Answer: 2)

Explanation:

Integration testing verifies that multiple components or services work together correctly. While unit tests typically focus on individual functions or modules in isolation, integration tests evaluate interactions between components such as an application and database, APIs, message queues, or external services. These tests can identify problems involving interfaces, data exchange, authentication, configuration, and communication that may not appear during isolated unit testing. Static formatting checks code style, while license scanning focuses on dependency licensing. Therefore, integration testing is the appropriate approach when the goal is to verify that multiple application components operate correctly together within the broader system.

Q320. Which practice best supports continuous improvement after a production incident?

1) Conduct a blameless postmortem
2) Delete monitoring data
3) Avoid documenting the incident
4) Ignore contributing factors

Correct Answer: 1)

Explanation:

A blameless postmortem helps teams understand what happened during a production incident without focusing on assigning personal blame. The discussion can examine the timeline, detection methods, system conditions, contributing factors, response actions, and opportunities for improvement. Teams can then create specific follow-up actions such as improving monitoring, updating runbooks, strengthening tests, or changing deployment procedures. This supports a culture of learning and continuous improvement. Deleting monitoring data or avoiding documentation removes valuable information that could prevent similar incidents. Therefore, conducting a blameless postmortem is an effective DevOps practice for learning from failures and improving system reliability.