View Full Microsoft AZ-400 Exam Dumps and Practice Test Dumps
Q361. Which Azure DevOps feature allows an organization to automatically inject additional steps into pipelines without modifying every pipeline definition?
1) Pipeline decorators
2) Variable groups
3) Agent pools
4) Release notes
Correct Answer: 1)
Explanation:
Pipeline decorators allow organizations to automatically add steps to pipeline jobs across multiple pipelines. This can be useful when an organization wants to enforce common requirements such as security scanning, compliance checks, telemetry collection, or standardized tasks. Instead of manually adding the same step to every pipeline definition, a decorator can apply the required behavior consistently. This supports centralized governance and helps reduce configuration duplication. Variable groups manage shared variables, agent pools provide execution resources, and release notes document changes. Therefore, pipeline decorators are the appropriate Azure DevOps feature for automatically injecting common pipeline steps across multiple pipelines.
Q362. What is a primary advantage of using reusable pipeline templates in Azure DevOps?
1) They eliminate the need for source control
2) They allow common pipeline logic to be shared
3) They prevent automated testing
4) They replace all deployment environments
Correct Answer: 2)
Explanation:
Reusable pipeline templates allow teams to define common pipeline logic once and reference it from multiple pipeline definitions. Templates can contain stages, jobs, steps, variables, or other reusable configuration depending on the design. This reduces duplication and makes it easier to maintain consistent CI/CD practices across many applications. When a shared template is updated, pipelines using that template can benefit from the standardized behavior. Templates do not eliminate source control, testing, or deployment environments. Instead, they help teams manage pipeline configuration more efficiently and consistently. Therefore, sharing common pipeline logic is a primary advantage of reusable pipeline templates.
Q363. Which Azure DevOps resource can be used to reference another pipeline as an input or dependency?
1) Pipeline resource
2) Variable group
3) Secure file
4) Agent capability
Correct Answer: 1)
Explanation:
A pipeline resource allows one pipeline to reference another pipeline as a resource. This is useful when organizations implement multi-pipeline workflows in which the output of one pipeline becomes an input or trigger for another. For example, a build pipeline may produce an artifact that a separate deployment pipeline consumes. Pipeline resources can also support traceability between related pipeline executions. Variable groups provide shared configuration, secure files store protected file content, and agent capabilities describe execution environments. Therefore, a pipeline resource is the appropriate Azure DevOps mechanism for referencing another pipeline as an input or dependency.
Q364. Which Azure DevOps capability is most useful when a deployment pipeline needs to consume an artifact produced by another pipeline?
1) Pipeline resource
2) Branch policy
3) Work item query
4) Sprint backlog
Correct Answer: 1)
Explanation:
Pipeline resources can be used when one pipeline needs to consume artifacts produced by another pipeline. This supports separation between build and deployment responsibilities while maintaining a clear relationship between the pipelines. For example, a dedicated build pipeline can compile and test an application, publish an artifact, and then a deployment pipeline can retrieve that artifact for deployment into different environments. This approach supports the principle of building once and promoting the same validated output. Branch policies manage source control requirements, while work item queries and sprint backlogs support planning. Therefore, pipeline resources are appropriate for consuming artifacts from another pipeline.
Q365. Which Git practice is most appropriate for integrating a completed feature into a shared main branch after review?
1) Pull request
2) Local stash
3) Git reset only
4) Dependency restore
Correct Answer: 1)
Explanation:
A pull request provides a structured mechanism for proposing changes to a shared branch after development work has been completed. Reviewers can examine the changes, discuss implementation details, verify automated checks, and ensure that required policies are satisfied before the changes are merged. Pull requests improve collaboration and provide an auditable history of code integration. A local Git stash temporarily stores uncommitted changes, while Git reset changes repository state and dependency restoration manages external packages. Therefore, a pull request is the most appropriate practice for integrating a completed feature into a shared branch after review.
Q366. Which branch policy can require automated builds to pass before a pull request can be completed?
1) Build validation
2) Comment policy
3) Work item query
4) Tag policy
Correct Answer: 1)
Explanation:
Build validation is a branch policy that requires a specified build or pipeline to complete successfully before a pull request can be completed. This helps prevent changes that fail compilation, automated tests, security checks, or other required validation from being merged into protected branches. Build validation is particularly useful for maintaining the quality of important branches such as main or release branches. Other pull request policies can address reviewers, linked work items, or comment resolution, but build validation specifically focuses on automated pipeline results. Therefore, build validation is the appropriate branch policy for requiring successful automated builds before pull request completion.
Q367. What is the purpose of a pull request reviewer requirement in Azure Repos?
1) Ensure designated reviewers approve changes
2) Increase artifact storage
3) Create deployment environments
4) Automatically scale virtual machines
Correct Answer: 1)
Explanation:
A pull request reviewer requirement ensures that specified users or groups review and approve changes before the pull request can be completed. This provides an additional quality and governance control for important branches. Reviewers can inspect code, identify defects, evaluate design decisions, and confirm that changes follow organizational standards. Required reviewers can be combined with build validation, comment resolution, and other branch policies to create a comprehensive pull request workflow. Artifact storage and infrastructure scaling are unrelated functions. Therefore, ensuring designated reviewers approve changes is the primary purpose of a pull request reviewer requirement.
Q368. Which Git operation creates a new commit that reverses the changes introduced by an earlier commit?
1) Git clone
2) Git revert
3) Git fetch
4) Git status
Correct Answer: 2)
Explanation:
Git revert creates a new commit that reverses the changes introduced by a specified earlier commit. This approach is particularly useful when a change has already been shared with other developers because it preserves the existing history rather than rewriting it. For example, if a production defect was introduced by a previous commit, a developer can create a revert commit that removes the problematic changes while maintaining a clear record of what happened. Git clone creates a local repository, fetch retrieves remote information, and status displays repository state. Therefore, Git revert is the appropriate operation for safely undoing a previously committed change.
Q369. Which Git command is commonly used to temporarily save uncommitted changes so the working directory can be switched to another task?
1) git merge
2) git stash
3) git tag
4) git log
Correct Answer: 2)
Explanation:
The git stash command temporarily saves uncommitted changes so that the working directory can be returned to a clean state. This is useful when a developer needs to switch branches or address another task without committing incomplete work. The stashed changes can later be restored when the developer returns to the original task. Git merge combines changes from different branches, git tag creates or manages references for commits, and git log displays commit history. Therefore, git stash is the appropriate command for temporarily setting aside unfinished local changes without creating a normal commit.
Q370. Which Git strategy creates a commit that combines the histories of two branches while preserving a merge point?
1) Merge
2) Stash
3) Fetch
4) Rebase-only deletion
Correct Answer: 1)
Explanation:
Git merge combines changes from different branches and can create a merge commit that represents the point where the histories were integrated. This preserves the branch history and makes the relationship between the two development lines visible. Teams often use merge operations when integrating feature branches into shared branches, particularly when preserving the historical context of parallel development is valuable. Git stash temporarily stores changes, while fetch retrieves updates from a remote repository without integrating them. Therefore, merge is the appropriate Git strategy for combining branch histories while preserving a visible merge point.
Q371. Which practice helps keep feature branches easier to review and integrate?
1) Keeping branches short-lived and focused
2) Keeping branches open indefinitely
3) Combining unrelated features into one branch
4) Avoiding pull requests
Correct Answer: 1)
Explanation:
Short-lived, focused feature branches generally make code changes easier to review, test, and integrate. A focused branch typically contains changes related to one feature, bug fix, or small objective. Keeping the branch lifetime short reduces the amount of divergence from the main branch and can decrease the likelihood of difficult merge conflicts. It also allows reviewers to understand the intended change more easily. Long-lived branches and unrelated changes increase integration complexity and make reviews harder. Avoiding pull requests removes valuable collaboration and quality controls. Therefore, keeping feature branches short-lived and focused is a recommended Git workflow practice.
Q372. Which Azure DevOps capability can automatically start a pipeline when a referenced pipeline completes successfully?
1) Pipeline completion trigger
2) Manual approval
3) Agent capability
4) Variable group
Correct Answer: 1)
Explanation:
A pipeline completion trigger allows one pipeline to start automatically after a referenced pipeline completes according to the configured conditions. This is useful for multi-stage delivery architectures where separate pipelines handle responsibilities such as building, testing, packaging, and deployment. For example, a deployment pipeline can be configured to begin when a build pipeline successfully produces a new artifact. This reduces manual coordination and supports automated delivery workflows. Manual approvals provide human governance, agent capabilities describe available execution features, and variable groups manage shared values. Therefore, a pipeline completion trigger is the appropriate capability for automatically starting a pipeline after another pipeline completes.
Q373. Which trigger is appropriate when a pipeline should run automatically every night regardless of code changes?
1) Scheduled trigger
2) Pull request trigger
3) Branch policy
4) Manual validation
Correct Answer: 1)
Explanation:
A scheduled trigger allows a pipeline to execute automatically at defined times or intervals. This is useful for activities such as nightly builds, recurring security scans, scheduled regression tests, maintenance workflows, or periodic environment validation. A scheduled execution can occur even when no new source code has been committed since the previous run. Pull request triggers focus on validating proposed source changes, branch policies enforce repository rules, and manual validation introduces a human checkpoint. Therefore, when a pipeline must run every night regardless of whether source changes occurred, a scheduled trigger is the appropriate choice.
Q374. Which pipeline feature allows a deployment stage to run only when a previous stage completed successfully?
1) Stage dependency condition
2) Artifact retention
3) Agent capability
4) Repository tag
Correct Answer: 1)
Explanation:
Stage dependency conditions control whether a stage should execute based on the result or state of another stage. A common CI/CD design requires testing to succeed before deployment begins. By configuring the deployment stage to depend on the successful completion of the testing stage, the pipeline prevents deployment when required validation fails. Conditions can also support more advanced workflows, such as running cleanup tasks after failures or executing specific stages under controlled circumstances. Artifact retention manages how long outputs are stored, agent capabilities describe execution environments, and repository tags identify source versions. Therefore, stage dependency conditions are appropriate for controlling stage execution based on earlier results.
Q375. Which Azure DevOps feature provides a controlled way to pause a pipeline and wait for human input?
1) ManualValidation task
2) Pipeline cache
3) Package feed
4) Git tag
Correct Answer: 1)
Explanation:
The ManualValidation task can pause a pipeline and wait for human intervention before execution continues. This is useful when a workflow requires someone to review information, confirm a deployment decision, or perform a business validation step. Manual validation can be placed at an appropriate point in a pipeline so that automated activities occur first and human approval is requested only when necessary. Pipeline caching improves performance, package feeds manage packages, and Git tags identify source revisions. Therefore, the ManualValidation task is the appropriate feature for introducing a deliberate human checkpoint into an automated pipeline.
Q376. Which Azure DevOps agent concept identifies specific requirements that an agent must satisfy before running a job?
1) Agent demands
2) Work item type
3) Repository tag
4) Artifact retention rule
Correct Answer: 1)
Explanation:
Agent demands allow a pipeline job to specify capabilities that an agent must have before the job can run. For example, a job may require a particular software capability, operating system characteristic, or custom agent capability. The Azure DevOps agent selection process uses these requirements to determine whether an available agent is suitable for the job. This is especially useful with self-hosted agent pools where machines can have different installed tools or configurations. Work item types organize project tasks, repository tags identify source versions, and artifact retention controls stored outputs. Therefore, agent demands are used to ensure jobs run only on compatible agents.
Q377. What is a key advantage of Microsoft-hosted agents for many CI/CD workloads?
1) The organization must maintain the operating system
2) Microsoft manages the agent environment
3) They permanently preserve every workspace
4) They require unrestricted administrator access
Correct Answer: 2)
Explanation:
Microsoft-hosted agents provide managed build and deployment environments, reducing the administrative work required from development teams. The organization does not have to maintain the underlying operating system, install routine updates, or manage the physical or virtual machine lifecycle in the same way required for self-hosted agents. Hosted agents are often useful when teams need standard environments for common development workloads. Self-hosted agents can still be preferable when specialized software, custom hardware, private network access, or persistent configuration is required. Therefore, having Microsoft manage the agent environment is a major advantage of Microsoft-hosted agents.
Q378. Which scenario is most appropriate for using a self-hosted Azure DevOps agent?
1) The pipeline requires access to resources inside a private network
2) The pipeline only needs a standard public build environment
3) No custom software is required
4) The organization wants no agent maintenance
Correct Answer: 1)
Explanation:
Self-hosted agents are useful when pipeline jobs require specialized software, custom configurations, private network connectivity, or other capabilities that may not be available on Microsoft-hosted agents. For example, an organization may need to deploy to internal systems that are inaccessible from the public environment or use specialized tools installed on controlled infrastructure. Self-hosted agents give the organization greater control over the execution environment but also introduce responsibilities for maintenance, security, updates, and capacity management. Standard workloads without special requirements can often use Microsoft-hosted agents. Therefore, private network access is a strong scenario for using a self-hosted agent.
Q379. What is an important security consideration when using self-hosted Azure DevOps agents?
1) Treat agents as trusted infrastructure and isolate them appropriately
2) Give every pipeline unrestricted administrator rights
3) Store passwords directly in source code
4) Disable all monitoring
Correct Answer: 1)
Explanation:
Self-hosted agents can execute pipeline code and therefore should be treated as important security infrastructure. Organizations should isolate agents appropriately, restrict network access, control administrative permissions, keep software updated, and monitor agent activity. In some environments, dedicated or ephemeral agents can reduce the risk of one pipeline’s activity affecting another. Giving pipelines unrestricted administrator access or storing passwords in source code creates unnecessary security exposure. Monitoring should remain enabled so suspicious behavior can be investigated. Therefore, treating self-hosted agents as trusted infrastructure that requires appropriate isolation and security controls is an important DevOps security practice.
Q380. Which approach can reduce the security risk of persistent build agents by creating clean environments for individual jobs?
1) Ephemeral agents
2) Shared administrator accounts
3) Permanent credentials in scripts
4) Unrestricted workspaces
Correct Answer: 1)
Explanation:
Ephemeral agents are temporary build environments that are created for specific jobs or short-lived workloads and then discarded. This approach can reduce the risk of persistent files, credentials, or malicious modifications remaining on an agent and affecting later pipeline executions. Fresh environments also improve isolation and can make builds more predictable when the environment is consistently provisioned. Organizations should still apply secure credential handling, network controls, and appropriate monitoring. Shared administrator accounts and permanent credentials increase security risks, while unrestricted workspaces can allow unwanted artifacts to persist. Therefore, ephemeral agents are an effective approach for improving isolation and reducing risks associated with persistent build environments.