Microsoft AZ-400 Practice Test Questions and Exam Dumps Part 13 Q241-260

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

 

Q241. Which Azure DevOps feature can require specific reviewers to approve changes to particular files or folders?

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

Correct Answer: 2)

Explanation:

Required reviewers are part of Azure Repos branch policies and can enforce review requirements for changes affecting specific branches, paths, or areas of a repository. This is useful when certain files contain sensitive configuration, infrastructure definitions, or business-critical code that should receive additional review. The policy can help ensure that appropriate team members participate before changes are merged. Pipeline caching improves build performance, artifact retention controls storage duration, and agent pools provide execution resources. Required reviewers therefore provide a governance mechanism for ensuring that important changes receive appropriate human review before integration.

Q242. What is the primary purpose of a Git pull request in an Azure DevOps development workflow?

1) Store pipeline secrets
2) Provision cloud infrastructure
3) Review and merge proposed code changes
4) Retain build artifacts

Correct Answer: 3)

Explanation:

A Git pull request provides a controlled process for reviewing proposed changes before they are merged into a target branch. Team members can inspect the code, leave comments, approve changes, request modifications, and evaluate automated validation results. Branch policies can further require successful builds, reviewer approvals, or other checks before completion. Pull requests therefore support collaboration, quality control, and controlled integration of changes. Pipeline secrets are managed through secure configuration features, infrastructure provisioning uses tools such as Bicep or Terraform, and artifact retention controls stored outputs. Pull requests primarily facilitate collaborative code review and merging.

Q243. Which merge strategy creates a merge commit that preserves the separate history of the source branch?

1) Squash merge
2) Rebase
3) Fast-forward only
4) No-fast-forward merge

Correct Answer: 4)

Explanation:

A no-fast-forward merge creates a merge commit even when Git could otherwise move the target branch pointer directly forward. This preserves the fact that a separate branch was merged and keeps the branch structure visible in the repository history. A squash merge combines changes into a single commit, while rebasing rewrites commit ancestry by placing commits on top of another base. A fast-forward merge does not create a merge commit when possible. Teams can select a merge strategy based on their desired balance between a clean history and preserving explicit branch integration information.

Q244. Which Git operation creates a new commit that reverses the changes introduced by an earlier commit?

1) Git revert
2) Git clone
3) Git fetch
4) Git tag

Correct Answer: 1)

Explanation:

Git revert creates a new commit that reverses the changes introduced by a specified earlier commit. This makes it particularly useful when a change has already been shared with other developers or merged into a common branch and needs to be safely undone without rewriting existing history. Git clone creates a local copy of a repository, fetch retrieves changes from a remote repository, and tags identify specific commits or versions. Because revert preserves the existing commit history while introducing a corrective commit, it is commonly preferred for undoing changes in shared branches.

Q245. Which Azure DevOps setting can prevent direct pushes to a protected branch and require changes to go through pull requests?

1) Artifact feed permissions
2) Branch policy
3) Pipeline cache
4) Service hook

Correct Answer: 2)

Explanation:

Branch policies can protect important branches by requiring changes to follow defined review and validation processes. Organizations can configure policies so that contributors cannot bypass pull requests and directly push changes to protected branches. Additional requirements can include minimum reviewer counts, successful builds, comment resolution, linked work items, or status checks. Artifact feed permissions control access to packages, pipeline caching improves build performance, and service hooks integrate Azure DevOps events with external services. Branch policies are therefore a central mechanism for enforcing governance and maintaining quality on important Git branches.

Q246. What is the main benefit of using short-lived feature branches in a Git-based development workflow?

1) They eliminate all code reviews
2) They reduce long-running divergence from the main branch
3) They permanently store deployment credentials
4) They prevent automated testing

Correct Answer: 2)

Explanation:

Short-lived feature branches are designed to keep development changes isolated while minimizing the amount of time a branch diverges from the main branch. Smaller and more frequent integrations generally reduce the likelihood of large merge conflicts and make code reviews easier to manage. They also support continuous integration because changes can be merged and validated more frequently. Feature branches do not eliminate code review, store credentials, or prevent automated testing. Instead, they work alongside pull requests, branch policies, and automated pipelines to create a more manageable and collaborative development workflow.

Q247. Which Azure DevOps capability records actions such as changes to permissions, security settings, and other organizational activities for auditing?

1) Azure DevOps Audit Logs
2) Pipeline artifacts
3) Deployment slots
4) Test plans

Correct Answer: 1)

Explanation:

Azure DevOps Audit Logs provide visibility into significant activities performed within an Azure DevOps organization. They can help administrators investigate changes involving permissions, security settings, organizational configuration, and other auditable events. Audit information is useful for governance, compliance, troubleshooting, and security investigations because it provides a record of who performed an action and when it occurred. Pipeline artifacts contain build outputs, deployment slots support application releases, and test plans organize testing activities. Audit Logs are therefore the appropriate feature when an organization needs historical information about important administrative or security-related activities.

Q248. A team wants to allow a pipeline to access Azure resources without storing a long-lived password in the YAML file. Which approach is most appropriate?

1) Hard-code a password
2) Commit a service principal secret
3) Use a secure service connection
4) Store credentials in source comments

Correct Answer: 3)

Explanation:

A secure service connection provides a controlled mechanism for Azure Pipelines to authenticate to external resources without exposing credentials directly in pipeline YAML. Access can be managed through appropriate permissions and identity mechanisms, helping organizations follow least-privilege principles. Hard-coding passwords or committing service principal secrets to source control creates significant security risks because credentials can be exposed through repositories, logs, or backups. Comments are not a secure storage mechanism either. Using a properly configured service connection therefore provides a safer and more manageable way for automated pipelines to access Azure resources.

Q249. Which practice helps ensure that production deployments use exactly the same tested application package that was produced by the build process?

1) Rebuilding separately for production
2) Build once and deploy the same artifact
3) Editing binaries manually
4) Creating a different package for every environment

Correct Answer: 2)

Explanation:

The build-once-and-deploy-the-same-artifact practice ensures that the exact application package tested during CI is promoted through later environments. This improves consistency and traceability because production receives the same artifact that passed earlier validation rather than a newly rebuilt version that could contain different dependencies or build conditions. Rebuilding separately for production introduces unnecessary variation, while manually editing binaries creates additional risk. Creating a different package for each environment also weakens confidence in test results. Promoting the same immutable artifact is therefore a strong release-management practice.

Q250. Which deployment approach gradually replaces instances of an application instead of switching all users to the new version at once?

1) Blue-green deployment
2) Canary deployment
3) Rolling deployment
4) Big-bang deployment

Correct Answer: 3)

Explanation:

Rolling deployment gradually replaces instances running the old application version with instances running the new version. This allows the deployment to progress incrementally instead of changing the entire workload simultaneously. Teams can monitor the application while the rollout proceeds and potentially stop or reverse the process if problems appear. Blue-green deployment uses separate environments, while canary deployment exposes a new version to a selected portion of users or traffic. Big-bang deployment changes the workload at once. Rolling deployment is therefore appropriate when gradual replacement of application instances is desired.

Q251. What is the main purpose of a canary deployment?

1) Expose the new version to a limited portion of traffic before wider release
2) Delete the previous production version immediately
3) Disable monitoring during deployment
4) Require every user to test the new version

Correct Answer: 1)

Explanation:

Canary deployment releases a new application version to a limited portion of users, servers, or traffic before expanding the release to everyone. The team can monitor performance, errors, and user behavior during the limited rollout. If serious problems occur, the deployment can be stopped before the new version reaches the entire production population. This reduces release risk and provides real-world validation. Canary deployment does not require deleting the previous version, disabling monitoring, or forcing every user to participate. Its main purpose is controlled exposure of a new release before broader adoption.

Q252. Which metric measures how long it takes for a change to move from being committed to being deployed into production?

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

Correct Answer: 4)

Explanation:

Lead time for changes measures the time required for a software change to progress from development or code commit through the delivery process until it is successfully deployed. It is an important DevOps performance indicator because shorter lead times can indicate a more efficient delivery process when quality and reliability are maintained. Deployment frequency measures how often deployments occur, change failure rate measures unsuccessful changes, and mean time to restore measures recovery after service failures. Lead time for changes therefore focuses specifically on the speed at which changes travel through the delivery lifecycle.

Q253. Which metric indicates how frequently an organization successfully deploys software to production?

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

Correct Answer: 1)

Explanation:

Deployment frequency measures how often an organization successfully releases software into production. It is commonly used as one of the key DevOps delivery metrics because it provides insight into how frequently teams can deliver value to users. A higher deployment frequency can indicate an efficient delivery process when supported by appropriate quality and reliability controls. Lead time measures the duration from change creation to deployment, change failure rate measures the proportion of deployments requiring remediation, and mean time to restore measures recovery duration. Deployment frequency therefore focuses specifically on release cadence.

Q254. Which activity is most appropriate after a major production incident to identify systemic improvements?

1) Delete the incident records
2) Conduct a blameless postmortem
3) Disable monitoring
4) Stop collecting deployment metrics

Correct Answer: 2)

Explanation:

A blameless postmortem provides a structured opportunity to understand what happened during an incident, why existing safeguards did not prevent or limit the problem, and what improvements should be implemented. The goal is to improve systems and processes rather than assign personal blame. Teams can review timelines, contributing factors, monitoring gaps, deployment practices, and recovery procedures. Deleting records or disabling monitoring removes valuable information, while stopping metrics collection makes future improvement harder. A blameless postmortem therefore supports continuous improvement and helps organizations reduce the likelihood or impact of similar incidents.

Q255. Which Azure DevOps feature allows teams to connect commits, pull requests, builds, and work items for improved traceability?

1) Deployment slots
2) Work item integration
3) Pipeline caching
4) Agent demands

Correct Answer: 2)

Explanation:

Work item integration helps connect development activities with tracked requirements and tasks. When commits, pull requests, builds, and deployments are associated with work items, teams can trace a feature or defect through the delivery lifecycle. This improves visibility for developers, testers, project managers, and auditors. Deployment slots manage application environments, pipeline caching improves build speed, and agent demands determine which agents can run specific jobs. Work item integration is therefore valuable for establishing end-to-end traceability from business requirements through source changes and automated delivery.

Q256. Which Azure Boards practice helps limit the number of work items actively being processed at one time?

1) WIP limits
2) Git tagging
3) Artifact retention
4) Pipeline decorators

Correct Answer: 1)

Explanation:

Work-in-progress, or WIP, limits restrict how many work items can be actively processed within a workflow stage at one time. Limiting WIP can help teams reduce multitasking, identify bottlenecks, and improve the flow of work toward completion. Instead of starting many tasks simultaneously, teams focus on finishing existing work before pulling additional items into progress. Git tags identify source versions, artifact retention controls stored outputs, and pipeline decorators modify pipeline behavior. WIP limits are therefore an important Kanban practice for maintaining a manageable workflow and improving delivery flow.

Q257. Which Azure DevOps feature can automatically send notifications when specific repository or pipeline events occur?

1) Service hooks
2) Git stash
3) Universal Packages
4) Secure files

Correct Answer: 1)

Explanation:

Service hooks allow Azure DevOps to notify or integrate with external systems when specified events occur. Organizations can use them for repository changes, build events, work item activities, and other supported triggers. For example, an event can send information to an external collaboration, monitoring, or automation system. Git stash temporarily stores local changes, Universal Packages distribute versioned package content, and secure files protect sensitive files used by pipelines. Service hooks are therefore the appropriate choice when Azure DevOps events need to trigger notifications or actions outside the platform.

Q258. Which practice helps identify whether infrastructure configuration has changed outside the Infrastructure as Code process?

1) IaC drift detection
2) Code formatting
3) Git tagging
4) Test case naming

Correct Answer: 1)

Explanation:

Infrastructure as Code drift occurs when the actual infrastructure environment differs from the configuration defined in the IaC source. Drift detection compares the expected configuration with the deployed state and can identify changes made manually or through other processes. Detecting drift is important because undocumented changes can cause deployment inconsistencies, security problems, and unexpected behavior. Code formatting and test case naming do not evaluate infrastructure state, while Git tags identify source versions. IaC drift detection therefore helps teams maintain consistency between declared infrastructure configuration and the actual environment.

Q259. Which technology can be used to define Azure infrastructure declaratively using Microsoft’s domain-specific language?

1) Bicep
2) KQL
3) Markdown
4) YAML only

Correct Answer: 1)

Explanation:

Bicep is a declarative language designed for deploying Azure resources through Azure Resource Manager. It provides a more concise syntax for defining infrastructure while maintaining the benefits of Infrastructure as Code, such as repeatability, version control, reviewability, and automation. KQL is primarily used for querying data in services such as Azure Monitor and Log Analytics. Markdown is a text-formatting language, while YAML is commonly used for configuration and pipeline definitions but is not itself Microsoft’s dedicated Azure infrastructure language. Bicep is therefore an appropriate choice for defining Azure infrastructure declaratively.

Q260. What is a major advantage of storing Infrastructure as Code definitions in a version control repository?

1) It prevents all infrastructure failures
2) It eliminates the need for testing
3) It provides change history and enables peer review
4) It automatically removes all security vulnerabilities

Correct Answer: 3)

Explanation:

Storing Infrastructure as Code definitions in version control provides a history of infrastructure changes and enables teams to review modifications before they are applied. Developers and infrastructure engineers can use pull requests, branch policies, automated validation, and peer review to improve the quality and safety of infrastructure changes. Version control does not guarantee that infrastructure will never fail, eliminate the need for testing, or automatically remove security vulnerabilities. Its primary advantage is providing controlled, auditable, collaborative management of infrastructure definitions throughout their lifecycle.