View Full Microsoft AZ-400 Exam Dumps and Practice Test Dumps
Q221. Which Azure DevOps feature allows a pipeline to be triggered when another pipeline completes successfully?
1) Pipeline resource trigger
2) Branch policy
3) Variable group
4) Artifact retention
Correct Answer: 1)
Explanation:
A pipeline resource trigger allows one Azure Pipeline to start based on the completion of another pipeline. This is useful when teams separate build and deployment workflows or when one pipeline produces an artifact that another pipeline consumes. For example, a build pipeline can create and validate an application package, while a deployment pipeline starts automatically after the build succeeds. Branch policies control repository changes, variable groups store shared configuration, and artifact retention determines how long outputs are kept. Pipeline resource triggers therefore support automated dependencies between multiple CI/CD pipelines.
Q222. A deployment stage should run only when the previous testing stage has completed successfully. Which Azure Pipelines feature should be used?
1) Git tags
2) Pipeline conditions
3) Azure Artifacts
4) Repository permissions
Correct Answer: 2)
Explanation:
Pipeline conditions allow stages, jobs, and steps to execute only when specified criteria are satisfied. A deployment stage can use a condition that checks whether the preceding testing stage completed successfully. This helps prevent deployments from proceeding when automated validation fails. Conditions can also be based on branch names, variables, previous job results, or other runtime information. Git tags identify versions, Azure Artifacts manages packages, and repository permissions control access to source code. Therefore, pipeline conditions provide the appropriate mechanism for controlling stage execution based on test results.
Q223. Which Azure Pipelines feature allows reusable YAML logic to be stored separately from the main pipeline definition?
1) Pipeline templates
2) Deployment slots
3) Action groups
4) Git tags
Correct Answer: 1)
Explanation:
Pipeline templates allow teams to define reusable YAML components that can be referenced from multiple pipeline definitions. Templates can contain common stages, jobs, steps, variables, or other configuration patterns. This reduces duplication and makes it easier to maintain standardized CI/CD processes across many applications. For example, an organization can maintain a shared security-scanning template and use it in multiple application pipelines. Deployment slots are used for application deployments, action groups handle monitoring notifications, and Git tags identify source versions. Templates are therefore the appropriate feature for creating reusable pipeline logic.
Q224. A company wants all application pipelines to automatically include a standard security scanning step without developers manually adding it. Which Azure DevOps capability can support this requirement?
1) Pipeline decorators
2) Git stash
3) Artifact feeds
4) Deployment groups
Correct Answer: 1)
Explanation:
Pipeline decorators can automatically inject predefined steps into pipelines, helping organizations enforce common requirements across many pipelines. This can be useful for standard security scanning, compliance checks, telemetry, or other organizational controls. Instead of depending on every developer to manually include the same task, an administrator can establish a standardized pipeline behavior. Git stash temporarily stores local changes, artifact feeds manage packages, and deployment groups are associated with deployment targeting. Pipeline decorators therefore provide a centralized way to add standardized behavior to supported pipelines.
Q225. A team needs to store a certificate that will be downloaded securely by a pipeline during deployment. Which Azure Pipelines feature is designed for this purpose?
1) Secure files
2) Git tags
3) Work items
4) Pipeline artifacts
Correct Answer: 1)
Explanation:
Secure files allow sensitive files such as certificates, signing keys, or configuration files to be securely stored and made available to authorized pipeline processes. Access to these files can be controlled so that only approved pipelines can retrieve them. This is safer than committing sensitive files directly into a source repository. Git tags identify versions, work items track development activities, and pipeline artifacts are generally intended for build outputs rather than sensitive credential files. Secure files are therefore the appropriate Azure Pipelines feature for securely managing certificates and other protected files required during automation.
Q226. Which Azure DevOps feature provides a centralized location for managing shared variables and secrets used by multiple pipelines?
1) Variable groups
2) Git branches
3) Azure Boards queries
4) Deployment slots
Correct Answer: 1)
Explanation:
Variable groups provide a centralized way to manage variables that can be shared across multiple Azure Pipelines. They are useful for maintaining common configuration values and can also contain protected secrets. Centralizing these values reduces duplication and makes pipeline maintenance easier because teams can update shared configuration without modifying every pipeline definition. Git branches organize source-code development, Azure Boards queries retrieve work items, and deployment slots support application deployment strategies. Variable groups are therefore a suitable solution when several pipelines need consistent access to shared configuration or protected values.
Q227. Which deployment strategy maintains two production-like environments so that traffic can be switched between the current and new versions?
1) Rolling deployment
2) Blue-green deployment
3) Big-bang deployment
4) Manual deployment
Correct Answer: 2)
Explanation:
Blue-green deployment maintains two production-like environments. One environment hosts the currently active version, while the other contains the new release. After the new version is tested and validated, traffic can be switched from the old environment to the new one. This can reduce downtime and make rollback easier because the previous environment can remain available for a period of time. Rolling deployment gradually replaces instances within the same environment, while big-bang deployment changes all users at once. Blue-green deployment is therefore appropriate when teams want controlled traffic switching between two environments.
Q228. Which Azure App Service capability allows a team to deploy a new application version to a separate environment before switching production traffic to it?
1) Deployment slots
2) Variable groups
3) Azure Boards
4) Agent pools
Correct Answer: 1)
Explanation:
Azure App Service deployment slots provide separate environments within an App Service application. Teams can deploy a new version to a non-production slot, validate the application, and then swap the slot with production when the release is ready. This approach reduces deployment risk because the new version can be tested without immediately replacing the production workload. Variable groups manage pipeline configuration, Azure Boards handles work tracking, and agent pools provide pipeline execution resources. Deployment slots are therefore useful for controlled application releases and safer production deployments.
Q229. A production deployment introduces a serious defect, and the previous version is still available as a validated artifact. What is the preferred immediate recovery action?
1) Delete the source repository
2) Redeploy the previously validated version
3) Disable all monitoring
4) Rebuild the application from an untested branch
Correct Answer: 2)
Explanation:
When a production deployment introduces a serious defect and a previously validated version is available, redeploying that known-good version can provide a rapid recovery path. This approach reduces uncertainty because the team is returning to software that has already passed its validation process. Rebuilding from an untested branch can introduce additional problems and delay recovery. Disabling monitoring removes important visibility, while deleting the repository is unnecessary and potentially destructive. Maintaining versioned artifacts and deployment history therefore supports reliable rollback procedures and helps teams restore service more quickly after failed releases.
Q230. Which practice helps ensure that a container image can be traced back to the source code and build that produced it?
1) Artifact provenance
2) Manual file copying
3) Untracked configuration
4) Local-only builds
Correct Answer: 1)
Explanation:
Artifact provenance provides information about where an artifact originated and how it was produced. For container images, provenance can connect an image to its source repository, commit, build process, dependencies, or other metadata. This improves traceability and can support security investigations, compliance requirements, and release auditing. Manual file copying and local-only builds make it harder to determine exactly how an image was created. Untracked configuration also reduces reproducibility. Artifact provenance is therefore an important DevSecOps practice for establishing confidence in the origin and build history of container images.
Q231. Which document provides information about the components and dependencies contained within a software application or container image?
1) Software Bill of Materials
2) Git branch policy
3) Deployment approval
4) Pipeline variable group
Correct Answer: 1)
Explanation:
A Software Bill of Materials, or SBOM, provides an inventory of software components and dependencies included in an application or artifact. It can help organizations identify vulnerable components, understand licensing information, and respond more effectively when a security issue affects a particular library or package. SBOMs are increasingly important in modern DevSecOps and software supply-chain security practices. Branch policies govern source-control changes, deployment approvals control release progression, and variable groups store configuration. Therefore, an SBOM is the appropriate mechanism for documenting the software components contained within an application or container image.
Q232. A security team wants to prevent a pipeline from using an outdated vulnerable dependency. Which practice should be incorporated into CI/CD?
1) Dependency vulnerability scanning
2) Increasing Git branch count
3) Removing automated builds
4) Disabling package version checks
Correct Answer: 1)
Explanation:
Dependency vulnerability scanning analyzes application dependencies against vulnerability databases or security rules. Integrating this process into CI/CD can help identify outdated or vulnerable packages before they reach production. Organizations can configure thresholds that cause a build or release to fail when serious vulnerabilities are detected. Increasing the number of Git branches does not directly improve dependency security, and disabling package checks would increase risk. Removing automated builds would also reduce useful validation. Dependency scanning is therefore an important DevSecOps control for identifying and managing vulnerabilities in third-party software components.
Q233. What is the primary purpose of artifact retention policies in Azure DevOps?
1) To determine how long pipeline artifacts and related outputs are stored
2) To create Git branches
3) To approve production deployments
4) To configure application alerts
Correct Answer: 1)
Explanation:
Artifact retention policies determine how long build outputs and other pipeline-related artifacts should be retained. Proper retention management helps organizations balance storage requirements, troubleshooting needs, compliance requirements, and cost. Teams may retain important production artifacts longer while allowing temporary development artifacts to expire sooner. Git branches manage source-code versions, production approvals control deployment authorization, and application alerts belong to monitoring systems. Therefore, artifact retention policies are primarily used to control the lifecycle of stored pipeline outputs and ensure that useful artifacts remain available for the required period.
Q234. Which package type is supported by Azure Artifacts for sharing internal packages between development teams?
1) Universal Packages
2) Git branches
3) YAML stages
4) Azure Monitor alerts
Correct Answer: 1)
Explanation:
Universal Packages are one type of package that Azure Artifacts can host and distribute. They are useful for storing and sharing collections of files or application-specific packages that do not necessarily fit traditional package formats. Teams can publish Universal Packages to feeds and consume specific versions through automated pipelines or development workflows. Git branches manage source code, YAML stages organize pipeline execution, and Azure Monitor alerts provide operational notifications. Universal Packages therefore provide a flexible artifact-sharing mechanism when teams need to distribute versioned internal files or packages.
Q235. A pipeline repeatedly downloads the same large dependencies, slowing down build execution. Which optimization can reduce unnecessary downloads?
1) Pipeline caching
2) Deleting package feeds
3) Disabling dependency management
4) Increasing branch count
Correct Answer: 1)
Explanation:
Pipeline caching can store frequently reused dependencies so that later pipeline executions can retrieve them from a cache instead of downloading them repeatedly. This can significantly reduce build time, especially for projects with large package dependencies or repeated installations. Cache keys can be based on dependency files so that the cache is refreshed when relevant dependencies change. Deleting package feeds or disabling dependency management would make builds less reliable, while increasing the number of branches does not improve dependency retrieval. Pipeline caching is therefore an effective performance optimization for repetitive CI workloads.
Q236. A team wants to run independent build jobs at the same time to shorten the total pipeline duration. Which pipeline capability should be used?
1) Sequential stages only
2) Parallel jobs
3) Manual approvals
4) Git tags
Correct Answer: 2)
Explanation:
Parallel jobs allow independent pipeline workloads to execute at the same time rather than waiting for one job to finish before another starts. This can reduce total pipeline execution time when tasks do not have dependencies on one another. For example, unit tests, linting, and separate platform builds may be able to run concurrently. Sequential execution can increase overall duration, while manual approvals intentionally introduce waiting points. Git tags identify source versions but do not affect execution concurrency. Parallel jobs are therefore useful when teams want to optimize CI/CD performance without changing the actual validation activities.
Q237. Which testing approach verifies that multiple application components work correctly together?
1) Unit testing
2) Integration testing
3) Static code analysis
4) Code formatting
Correct Answer: 2)
Explanation:
Integration testing verifies that different application components, services, databases, APIs, or modules interact correctly. While unit tests generally focus on individual functions or components in isolation, integration tests examine the behavior of multiple components working together. This can help identify problems involving interfaces, data exchange, authentication, configuration, or external dependencies. Static code analysis examines source code without executing the application, while formatting checks focus on code style. Integration testing is therefore especially important in CI/CD pipelines when teams need confidence that independently developed components operate correctly as a combined system.
Q238. Which metric measures the percentage of production deployments that result in a failure requiring remediation?
1) Deployment frequency
2) Lead time
3) Change failure rate
4) Mean time to restore
Correct Answer: 3)
Explanation:
Change failure rate measures the proportion of deployments that result in failures requiring remediation, such as rollback, hotfixes, or other corrective actions. It provides insight into the quality and stability of the organization’s delivery process. Deployment frequency measures how often deployments occur, lead time measures how quickly changes move through the delivery process, and mean time to restore measures recovery duration after an incident. Monitoring change failure rate alongside other delivery metrics can help teams determine whether increasing release speed is being achieved without sacrificing reliability.
Q239. Which practice encourages security activities to occur earlier in the software development lifecycle?
1) Shift-left security
2) Production-only testing
3) Manual release-only security
4) Delayed vulnerability scanning
Correct Answer: 1)
Explanation:
Shift-left security means integrating security practices earlier in the software development lifecycle rather than waiting until the final stages before release. Examples include secure coding analysis, dependency scanning, secret detection, infrastructure validation, and automated security testing during development and CI. Finding vulnerabilities earlier generally makes them easier and less expensive to fix because they can be addressed before reaching later environments. Production-only testing and delayed scanning provide feedback much later. Therefore, shift-left security is an important DevSecOps principle for making security a continuous part of software delivery.
Q240. A team wants to automatically notify an external collaboration system whenever a work item is created or updated in Azure DevOps. Which capability can support this integration?
1) Service hooks
2) Git stash
3) Pipeline caching
4) Deployment slots
Correct Answer: 1)
Explanation:
Azure DevOps service hooks can send notifications or trigger actions in external services when specified events occur. Teams can configure hooks for events involving work items, repositories, builds, releases, and other supported Azure DevOps activities. This allows development workflows to integrate with communication, monitoring, automation, or collaboration systems. Git stash is used to temporarily store local changes, pipeline caching improves build performance, and deployment slots support application release strategies. Service hooks are therefore an appropriate integration mechanism when external systems need to respond automatically to Azure DevOps events.