Microsoft AZ-400 Practice Test Questions and Exam Dumps Part 10 Q181-200

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

 

Q181. Which Azure DevOps feature helps an organization review changes to security settings, permissions, and other administrative activities?

1) Azure Test Plans
2) Azure Artifacts
3) Audit Logs
4) Azure Boards

Correct Answer: 3)

Explanation:

Azure DevOps Audit Logs provide visibility into significant organizational activities and administrative changes. They can help administrators investigate modifications to security settings, permissions, users, repositories, and other resources. This information is valuable for security investigations, compliance reviews, and troubleshooting unexpected changes. Azure Boards is focused on work management, Azure Artifacts manages packages, and Azure Test Plans supports testing activities. Audit Logs are therefore the most appropriate feature when an organization needs to understand who performed specific administrative or security-related actions and when those actions occurred.

Q182. A team wants developers to modify repositories within one project but should not allow them to administer the entire Azure DevOps organization. Which permission approach follows least privilege?

1) Grant project-level permissions
2) Grant organization administrator permissions
3) Grant project collection administrator permissions
4) Give all users owner permissions

Correct Answer: 1)

Explanation:

Project-level permissions allow administrators to provide users with access appropriate to a particular Azure DevOps project without granting unnecessary organization-wide privileges. This follows the principle of least privilege because developers receive only the access required to perform their work. Organization administrator and project collection administrator permissions are much broader and can expose unrelated projects and resources. Giving users owner-level access also creates unnecessary security risk. Therefore, when developers need to work with repositories inside a single project, project-level permissions are generally the most appropriate choice.

Q183. A YAML pipeline uses a protected environment that requires approval before deployment. Where should the approval requirement be configured?

1) Git repository settings
2) Environment checks
3) Azure Boards
4) Variable templates

Correct Answer: 2)

Explanation:

Environment checks can be configured to control whether a pipeline is allowed to deploy to a protected environment. An approval check can require an authorized person or group to approve a deployment before the pipeline proceeds. This provides an important control for production and other sensitive environments. Git repository settings manage source control, Azure Boards handles work tracking, and variable templates provide reusable pipeline configuration. Environment checks are therefore the appropriate mechanism for enforcing deployment approval before a pipeline can access a protected environment.

Q184. A team wants to require that all pull requests receive approval from designated reviewers before they can be merged. Which Azure Repos capability should be configured?

1) Pipeline caching
2) Branch policies
3) Azure Monitor alerts
4) Artifact retention

Correct Answer: 2)

Explanation:

Branch policies can enforce rules that pull requests must satisfy before they are completed. One important branch policy is requiring a minimum number of reviewers or specific reviewers for changes to protected branches. This helps maintain code quality and ensures that important changes receive appropriate peer or expert review. Pipeline caching improves build performance, Azure Monitor alerts support operational monitoring, and artifact retention controls how long build outputs are stored. Therefore, branch policies are the correct feature for enforcing mandatory pull-request review requirements.

Q185. Two developers modify the same lines of a Git file and attempt to merge their branches. What is the most likely result?

1) The repository is automatically deleted
2) A merge conflict occurs
3) The pipeline automatically rolls back
4) The branch is permanently locked

Correct Answer: 2)

Explanation:

A Git merge conflict can occur when two branches contain incompatible changes to the same part of a file. Git cannot always determine which version should be retained, so it marks the conflicting area and requires the developer to resolve the conflict manually. The developer can review both changes, select or combine the appropriate content, and then complete the merge. A merge conflict does not normally delete the repository or permanently lock the branch. Understanding conflict resolution is important for teams using collaborative Git workflows and multiple parallel development branches.

Q186. A large monorepo contains several independent applications. What is an effective way to reduce unnecessary pipeline executions when only one application changes?

1) Remove all automated builds
2) Use path-based pipeline triggers
3) Disable version control
4) Require manual deployment for every commit

Correct Answer: 2)

Explanation:

Path-based pipeline triggers can help optimize CI processes in a monorepo by running a pipeline only when files relevant to a particular application or component change. For example, a pipeline for an application can be configured to respond only to changes under that application’s directory. This reduces unnecessary builds, saves agent resources, and can shorten feedback time. Disabling automated builds or version control would remove important DevOps capabilities. Therefore, path-based triggers are a practical optimization for large repositories containing multiple independent applications or services.

Q187. A pipeline must use a shared YAML template stored in another repository. Which capability is most appropriate?

1) Repository resources
2) Deployment slots
3) Azure Monitor Workbooks
4) Test case parameters

Correct Answer: 1)

Explanation:

Repository resources allow Azure Pipelines to reference additional repositories from a pipeline definition. This is useful when organizations maintain shared YAML templates, common pipeline logic, infrastructure definitions, or other reusable content in a centralized repository. The pipeline can declare the additional repository and then reference the required templates. Deployment slots are used for application deployment strategies, Azure Monitor Workbooks support monitoring visualization, and test case parameters are related to testing. Repository resources therefore provide the appropriate mechanism for consuming shared pipeline templates maintained outside the primary application repository.

Q188. Which statement best describes a runtime expression in an Azure Pipelines YAML definition?

1) It is evaluated while the pipeline is executing
2) It permanently modifies the Git repository
3) It creates a new Azure subscription
4) It replaces all pipeline templates

Correct Answer: 1)

Explanation:

Runtime expressions are evaluated during pipeline execution and can be used to make decisions based on runtime information. They are commonly used with conditions, variables, and job or stage execution logic. This differs from compile-time expressions, which are processed when the YAML structure is expanded before the pipeline runs. Runtime expressions are useful when the pipeline needs to respond to values or conditions available during execution. They do not modify Git repositories or create Azure subscriptions. Understanding runtime evaluation helps developers create more dynamic and conditional multi-stage Azure Pipelines.

Q189. A security team wants to prevent passwords and access tokens stored in pipeline variables from appearing in build logs. Which practice should be used?

1) Store every secret as plain text
2) Disable all pipeline logs
3) Use secret variables and avoid printing their values
4) Put secrets directly inside source code

Correct Answer: 3)

Explanation:

Secret variables are designed to protect sensitive values used by pipelines. Their values should be securely stored and should never be intentionally printed in logs. Teams should also avoid placing passwords, tokens, or keys directly in source code because repositories may be accessed by many users and historical commits can retain exposed secrets. Azure Pipelines provides mechanisms for masking secret values, but developers should still design scripts carefully so that sensitive information is not deliberately written to output. Using secret variables and secure secret-management practices reduces the likelihood of accidental credential exposure.

Q190. Which practice is especially important when operating self-hosted Azure DevOps agents?

1) Allow every user to administer the operating system
2) Run unrelated workloads on the same unrestricted agent
3) Secure and isolate the agent environment
4) Store credentials in plain-text scripts

Correct Answer: 3)

Explanation:

Self-hosted agents run pipeline tasks within an organization’s own infrastructure, so securing and isolating the agent environment is important. Pipeline jobs may execute scripts, download dependencies, access credentials, or interact with deployment resources. Organizations should restrict administrative access, keep the operating system and installed software updated, and consider isolation between workloads when appropriate. Allowing unrestricted users or storing credentials in plain text increases security risks. Self-hosted agents provide greater control over infrastructure, but they also require the organization to take responsibility for securing the machines and their surrounding environment.

Q191. A team wants each deployment to use a clean virtual machine that is created for the job and discarded afterward. Which approach provides this type of build environment?

1) Ephemeral agents
2) Permanent shared agents
3) Git tags
4) Variable groups

Correct Answer: 1)

Explanation:

Ephemeral agents are temporary build or deployment environments that are created for a specific workload and then removed after the job completes. This approach can improve isolation because one pipeline execution does not leave behind files, tools, or configuration that could affect a later job. It can also help maintain consistent environments by creating agents from a known image or configuration. Permanent shared agents can accumulate state between jobs and require additional maintenance. Git tags identify source versions, while variable groups manage shared configuration. Therefore, ephemeral agents are well suited to clean, isolated pipeline execution.

Q192. A team wants to ensure that database schema changes can be deployed safely alongside application releases. Which practice is most appropriate?

1) Ignore database compatibility during deployment
2) Use versioned and automated database migration scripts
3) Make database changes manually without tracking them
4) Delete the existing database before every deployment

Correct Answer: 2)

Explanation:

Versioned and automated database migration scripts allow database schema changes to be tracked, reviewed, tested, and applied consistently across environments. This approach integrates database changes into the CI/CD process and reduces the risk of differences between development, testing, and production databases. Teams can also design migrations to maintain backward compatibility when applications are released gradually. Manual untracked changes make environments harder to reproduce and troubleshoot. Deleting a database is clearly unsafe for production systems. Therefore, automated and version-controlled database migrations are an important DevOps practice for reliable application delivery.

Q193. What is a major benefit of designing database migrations to be backward compatible during a rolling application deployment?

1) Older and newer application versions can temporarily coexist
2) All application servers must stop permanently
3) Database backups become unnecessary
4) Source control is no longer required

Correct Answer: 1)

Explanation:

Backward-compatible database migrations allow different versions of an application to work with the database during a gradual deployment. This is especially important in rolling or staged deployments, where old application instances may continue running while new instances are introduced. For example, a new database column can initially be added without removing an older column that existing application versions still require. This reduces deployment risk and supports gradual migration. Backward compatibility does not eliminate backups or source control. Instead, it provides an additional strategy for safely coordinating application and database changes.

Q194. A team discovers that developers frequently modify Azure resources manually, causing the environment to differ from the Infrastructure as Code definitions. What should the team implement?

1) More manual changes
2) Drift detection and controlled infrastructure changes
3) Disable source control
4) Remove all infrastructure automation

Correct Answer: 2)

Explanation:

Infrastructure drift occurs when the deployed environment differs from the desired configuration defined in Infrastructure as Code. Drift detection can help teams identify these differences, while controlled infrastructure changes ensure that updates are made through the approved IaC process rather than undocumented manual modifications. This improves consistency, reproducibility, and auditability. Organizations can also establish policies that discourage or restrict direct changes to managed resources. Increasing manual changes or removing automation would make drift more difficult to control. Therefore, combining drift detection with disciplined IaC practices is the most effective approach.

Q195. A company wants to reuse a common network configuration across multiple Bicep deployments. Which approach provides the best maintainability?

1) Duplicate the network code in every template
2) Create a reusable Bicep module
3) Store the configuration only in a spreadsheet
4) Manually create the network before every deployment

Correct Answer: 2)

Explanation:

Reusable Bicep modules allow common infrastructure definitions to be centralized and consumed by multiple deployments. A networking module could define virtual networks, subnets, route tables, or other related resources according to organizational standards. Applications can then reference the module and provide only the values that differ between environments. This reduces duplicated code and makes updates easier because a common definition can be maintained in one place. Spreadsheets and manual provisioning do not provide the same automation and consistency. Therefore, Bicep modules are an effective way to improve infrastructure reuse and maintainability.

Q196. A Terraform team wants multiple engineers to work with the same infrastructure state without storing the state file on each developer’s workstation. What should they use?

1) Remote state storage
2) Local Git tags
3) Docker images
4) Azure Boards queries

Correct Answer: 1)

Explanation:

Remote Terraform state storage allows multiple team members and automation processes to access a shared state location instead of maintaining separate local state files. Remote state can also provide features such as controlled access, locking, and centralized management depending on the backend being used. This reduces the risk of engineers working from different or outdated state information. Git tags identify source versions, Docker images package applications, and Azure Boards queries support work tracking. Therefore, remote state storage is the appropriate solution for collaborative Terraform environments where infrastructure state must be centrally managed.

Q197. An operations engineer needs to find all failed requests in Azure Monitor and group them by application name. Which capability should be used?

1) Kusto Query Language
2) Git merge
3) Docker Compose
4) Branch policies

Correct Answer: 1)

Explanation:

Kusto Query Language provides powerful capabilities for querying and analyzing data stored in Azure Monitor and Log Analytics. An engineer can filter records for failed requests, select relevant fields, and use aggregation operators to group results by application name or another property. This makes KQL useful for troubleshooting, performance analysis, and operational reporting. Git merge manages source-code integration, Docker Compose is used for defining multi-container applications, and branch policies enforce repository rules. Therefore, KQL is the appropriate capability for querying and grouping Azure Monitor log data.

Q198. A DevOps team wants a single interactive monitoring page that combines metrics, log queries, text, and visualizations for a production service. Which feature should they use?

1) Azure Artifacts
2) Azure Monitor Workbooks
3) Git branches
4) Azure Repos policies

Correct Answer: 2)

Explanation:

Azure Monitor Workbooks provide customizable interactive monitoring experiences that can combine metrics, log queries, charts, text, and other visualizations. Teams can design workbooks specifically for applications, infrastructure, or operational scenarios and use them to investigate system health and trends. This provides a more flexible experience than viewing individual metrics or logs separately. Azure Artifacts is used for package management, Git branches organize source-code changes, and repository policies enforce development rules. Therefore, Azure Monitor Workbooks are the best choice when an operations team needs a consolidated and interactive production monitoring view.

Q199. An alert should notify several engineers through email and also trigger an automated workflow. Which Azure Monitor feature should contain these actions?

1) Action group
2) Git repository
3) Pipeline artifact
4) Bicep module

Correct Answer: 1)

Explanation:

Azure Monitor action groups define a collection of notification and automation actions associated with alerts. An action group can be configured to notify multiple recipients and can also invoke supported automation or integration mechanisms. This allows teams to standardize responses for different categories of alerts without recreating notification configurations for every alert rule. Git repositories store source code, pipeline artifacts contain build outputs, and Bicep modules define reusable infrastructure. Therefore, an action group is the appropriate Azure Monitor component for coordinating notifications and automated responses when an alert is triggered.

Q200. After resolving a major production incident, the team wants to identify the root causes, document lessons learned, and define improvements without blaming individuals. What practice should be performed?

1) Delete the incident records
2) Conduct a blameless postmortem
3) Disable monitoring
4) Remove the deployment pipeline

Correct Answer: 2)

Explanation:

A blameless postmortem focuses on understanding what happened, why the incident occurred, how detection and response worked, and what improvements can prevent similar incidents. The objective is to improve systems and processes rather than assign personal blame. Teams can document timelines, contributing factors, monitoring gaps, communication issues, and corrective actions. These lessons can then be incorporated into runbooks, automation, testing, monitoring, and deployment practices. Deleting records or disabling monitoring would remove valuable information and reduce future reliability. Therefore, a blameless postmortem is an important continuous-improvement practice following a significant production incident.