Designing and Implementing Microsoft DevOps Solutions
Exam Details
Exam Code
:AZ-400
Exam Name
:Designing and Implementing Microsoft DevOps Solutions
Certification
:Microsoft Certifications
Vendor
:Microsoft
Total Questions
:614 Q&As
Last Updated
:Apr 10, 2025
Microsoft Microsoft Certifications AZ-400 Questions & Answers
Question 181:
You have an Azure subscription that contains an Azure Pipelines pipeline named Pipeline1 and a user named User1. Pipeline1 is used to build and test an app named App1. User1 is assigned the Contributors role for Pipeline1.
You plan to test App1 by using an Azure Deployment Environments environment.
You need to ensure that User1 can provision the environment. The solution must follow the principle of least privilege.
Which role should you assign to User1?
A. DevCenter Project Admin
B. Deployment Environments User
C. Contributors
D. Build Administrators
Correct Answer: B
Azure Deployment Environments supports three built-in roles:
Dev Center Project Admin: Creates environments and manages the environment types for a project.
Deployment Environments User: Creates environments based on appropriate access.
Deployment Environments Reader: Reads environments that other users created.
You have an Azure pipeline that is used to deploy an app named App1.
You need to ensure that new versions of App1 are released only if they exceed performance baselines. The solution must minimize administrative effort.
What should you configure?
A. an Azure Pipelines release artifact
B. an Azure Repos branch policy
C. an Azure Monitor alert
D. an Azure Pipelines deployment gate
Correct Answer: D
Controlling Deployments using Release Gates
Deployments to each environment are fully automated by using jobs and tasks. Ideally, you do not want new updates to the applications to be exposed to all the users at the same time. It is a best practice to expose updates in a phased
manner i.e. expose to a subset of users, monitor their usage and expose to other users based on the experience the initial set of users had.
Approvals and gates enable you to take control over the start and completion of the deployments in a release. With approvals, you can wait for users to manually approve or reject deployments. Using release gates, you can specify application
health criteria that must be met before release is promoted to the next environment. Prior to or after any environment deployment, all the specified gates are automatically evaluated until they all pass or until they reach your defined timeout
period and fail.
Gates can be added to an environment in the release definition from the pre-deployment conditions or the post-deployment conditions panel. Multiple gates can be added to the environment conditions to ensure all the inputs are successful for
the release.
Incorrect:
Not A: Azure Artifacts allow developers to publish and consume various types of packages from feeds and public registries like PyPI, Maven Central, and NuGet.org. You can combine Azure Artifacts with Azure Pipelines to publish build and
pipeline artifacts, deploy packages, or integrate files across different stages of your pipeline for building, testing, or deploying your application.
Four types of gates are included by default for every account.
Invoke Azure function: Trigger execution of an Azure function and ensures a successful completion.
Query Azure monitor alerts: Observe the configured Azure monitor alert rules for active alerts.
Invoke REST API: Make a call to a REST API and continue if it returns a successful response.
Query Workitems: Ensures the number of matching work items returned from a query is within a threshold.
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while
others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You use an Azure Pipelines pipeline to build and release web apps.
You need to configure the pipeline to meet the following requirements:
1.
Only run when there is a change in the /webapp folder.
2.
Only run when a pr is created.
Solution: You configure the pipeline definition by using the following elements.
Does this meet the goal?
A. Yes
B. No
Correct Answer: B
Question 184:
You have an Azure pipeline that is used to build and deploy an app named App1. The build job uses a Microsoft-hosted Windows agent.
The build job for App1 intermittently returns a timeout error.
You need to ensure that the build job completes successfully. The solution must minimize administrative effort.
What should you do?
A. Change the configuration of the build agent.
B. Deploy a self-hosted agent.
C. Change to a Microsoft-hosted Linux agent.
D. Purchase more parallel jobs.
Correct Answer: B
Job time-out A pipeline can run for a long time and then fail due to job time-out. Job timeout closely depends on the agent being used. Free Microsoft hosted agents have a max timeout of 60 minutes per job for a private repository and 360 minutes for a public repository. To increase the max timeout for a job, you can opt for any of the following.
Buy a Microsoft hosted agent which will give you 360 minutes for all jobs, irrespective of the repository used *-> Use a self-hosted agent to rule out any timeout issues due to the agent
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure pipeline that is used to deploy a web app. The pipeline includes a test suite named TestSuite1. TestSuite1 is used to validate the operations of the web app.
TestSuite1 fails intermittently.
You identify that the failures are unrelated to changes in the source code and execution environment.
You need to minimize troubleshooting effort for the TestSuite1 failures.
Solution: You increase code coverage.
Does this meet the goal?
A. Yes
B. No
Correct Answer: B
Manage flaky tests Productivity for developers relies on the ability of tests to find real problems with the code under development or update in a timely and reliable fashion. Flaky tests present a barrier to finding real problems, since the failures often don't relate to the changes being tested. A flaky test is a test that provides different outcomes, such as pass or fail, even when there are no changes in the source code or execution environment. Flaky tests also impact the quality of shipped code.
The goal of bringing flaky test management in-product is to reduce developer pain cause by flaky tests and cater to the whole workflow. Flaky test management provides the following benefits. Detection - Auto detection of flaky test with rerun or extensibility to plug in your own custom detection method Management of flakiness - Once a test is marked as flaky, the data is available for all pipelines for that branch Report on flaky tests - Ability to choose if you want to prevent build failures caused by flaky tests, or use the flaky tag only for troubleshooting Resolution - Manual bug-creation or manual marking and unmarking test as flaky based on your analysis Close the loop - Reset flaky test as a result of bug resolution / manual input Reference:
You plan to publish build artifacts by using an Azure pipeline.
You need to create an .artifactignorefile that meets the following requirements:
1.
Includes all files in the build output folder and all subfolders
2.
Excludes files that have the .dll extension What should you include in the file?
A. ./**!*.dll
B. **/*!*.dll
C. */***.dll
D. **/*#*.dll
Correct Answer: B
Use .artifactignore
Syntax
The .artifactignore follows the same syntax as the .gitignore with some minor limitations.
Example
In the following example, we will be ignoring all files except the ones in the src/MyApp/bin/Release directory.
**/*
!src/MyApp/bin/Release/**.*
PATTERN FORMAT
*
An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn't list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined. Put a backslash ("\") in front of the first "!" for patterns that begin with a literal "!", for example, "\!important!.txt".
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure pipeline that is used to deploy a web app. The pipeline includes a test suite named TestSuite1. TestSuite1 is used to validate the operations of the web app.
TestSuite1 fails intermittently.
You identify that the failures are unrelated to changes in the source code and execution environment.
You need to minimize troubleshooting effort for the TestSuite1 failures.
Solution: You enable Test Impact Analysis (TIA).
Does this meet the goal?
A. Yes
B. No
Correct Answer: B
Manage flaky tests Productivity for developers relies on the ability of tests to find real problems with the code under development or update in a timely and reliable fashion. Flaky tests present a barrier to finding real problems, since the failures often don't relate to the changes being tested. A flaky test is a test that provides different outcomes, such as pass or fail, even when there are no changes in the source code or execution environment. Flaky tests also impact the quality of shipped code.
The goal of bringing flaky test management in-product is to reduce developer pain cause by flaky tests and cater to the whole workflow. Flaky test management provides the following benefits. Detection - Auto detection of flaky test with rerun or extensibility to plug in your own custom detection method Management of flakiness - Once a test is marked as flaky, the data is available for all pipelines for that branch Report on flaky tests - Ability to choose if you want to prevent build failures caused by flaky tests, or use the flaky tag only for troubleshooting Resolution - Manual bug-creation or manual marking and unmarking test as flaky based on your analysis Close the loop - Reset flaky test as a result of bug resolution / manual input Reference:
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure pipeline that is used to deploy a web app. The pipeline includes a test suite named TestSuite1. TestSuite1 is used to validate the operations of the web app.
TestSuite1 fails intermittently.
You identify that the failures are unrelated to changes in the source code and execution environment.
You need to minimize troubleshooting effort for the TestSuite1 failures.
Solution: You implement the Test Results Trend widget.
Does this meet the goal?
A. Yes
B. No
Correct Answer: B
Manage flaky tests Productivity for developers relies on the ability of tests to find real problems with the code under development or update in a timely and reliable fashion. Flaky tests present a barrier to finding real problems, since the failures often don't relate to the changes being tested. A flaky test is a test that provides different outcomes, such as pass or fail, even when there are no changes in the source code or execution environment. Flaky tests also impact the quality of shipped code.
The goal of bringing flaky test management in-product is to reduce developer pain cause by flaky tests and cater to the whole workflow. Flaky test management provides the following benefits. Detection - Auto detection of flaky test with rerun or extensibility to plug in your own custom detection method Management of flakiness - Once a test is marked as flaky, the data is available for all pipelines for that branch Report on flaky tests - Ability to choose if you want to prevent build failures caused by flaky tests, or use the flaky tag only for troubleshooting Resolution - Manual bug-creation or manual marking and unmarking test as flaky based on your analysis Close the loop - Reset flaky test as a result of bug resolution / manual input Reference:
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure pipeline that is used to deploy a web app. The pipeline includes a test suite named TestSuite1. TestSuite1 is used to validate the operations of the web app.
TestSuite1 fails intermittently.
You identify that the failures are unrelated to changes in the source code and execution environment.
You need to minimize troubleshooting effort for the TestSuite1 failures.
Solution: You enable flaky test management.
Does this meet the goal?
A. Yes
B. No
Correct Answer: A
Manage flaky tests Productivity for developers relies on the ability of tests to find real problems with the code under development or update in a timely and reliable fashion. Flaky tests present a barrier to finding real problems, since the failures often don't relate to the changes being tested. A flaky test is a test that provides different outcomes, such as pass or fail, even when there are no changes in the source code or execution environment. Flaky tests also impact the quality of shipped code.
The goal of bringing flaky test management in-product is to reduce developer pain cause by flaky tests and cater to the whole workflow. Flaky test management provides the following benefits. Detection - Auto detection of flaky test with rerun or extensibility to plug in your own custom detection method Management of flakiness - Once a test is marked as flaky, the data is available for all pipelines for that branch Report on flaky tests - Ability to choose if you want to prevent build failures caused by flaky tests, or use the flaky tag only for troubleshooting Resolution - Manual bug-creation or manual marking and unmarking test as flaky based on your analysis Close the loop - Reset flaky test as a result of bug resolution / manual input Reference:
You have an Azure subscription that contains an Azure pipeline named Pipeline1 and a GitHub repository named Repo1. Repo1 contains Bicep modules. Pipeline1 deploys Azure resources by using the Bicep modules.
You need to ensure that all releases comply with Azure Policy before they are deployed to production.
What should you do?
A. To Pipeline1, add a step that runs a What if deployment before the deployment step.
B. Configure a deployment gate for Pipeline1 that uses Azure Automation to run a What If deployment.
C. Create an Azure DevOps build that runs on the creation of a pull request and assesses the code for compliance.
D. Configure a deployment gate for Pipeline1 and include the Azure DevOps Security and compliance assessment task.
Correct Answer: D
Deployment gates
Gates allow automatic collection of health signals from external services and then promote the release when all the signals are successful or stop the deployment on timeout. Typically, gates are used in connection with incident management,
problem management, change management, monitoring, and external approval systems.
Use cases
Some common use cases for deployment gates are:
*
Security scan: Perform security checks such as artifacts scanning, code signing, and policy checking. A deployment gate might initiate the scan and wait for it to complete, or just check for completion.
*
Etc.
The following gates are available by default:
*
Security and compliance assessment: Assess Azure Policy compliance on resources within the scope of a given subscription and resource group, and optionally at a specific resource level. See Check Azure Policy compliance task for more details.
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your AZ-400 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.