AZ-400 Microsoft Azure DevOps Solutions Questions and Answers
You have an Azure DevOps project named Project1 and an Azure subscription named Sub1.
You need to prevent releases from being deployed unless the releases comply with the Azure Policy rules assigned to Sub1.
What should you do in the release pipeline of Project1?
NO: 15 DRAG DROP
You are developing a full Microsoft .NET Framework solution that includes unit tests.
You need to configure SonarQube to perform a code quality validation of the C# code as part of the build pipelines.
Which four tasks should you perform in sequence? To answer, move the appropriate tasks from the list of tasks to the answer area and arrange them in the correct order.

Your company develops an application named App1 that is deployed in production.
As part of an application update, a new service is being added to App1. The new service requires access to an application named App2 that is currently in development.
You need to ensure that you can deploy the update to App1 before App2 becomes available. You must be able to enable the service in App1 once App2 is deployed.
What should you do?
Your company has a project in Azure DevOps for a new application. The application will be deployed to several Azure virtual machines that run Windows Server 2022. You need to recommend a deployment strategy for the virtual machines. The strategy must meet the following requirements:
• Ensure that the virtual machines maintain a consistent configuration.
• Minimize administrative effort to configure the virtual machines.
What should you include in the recommendation?
You need to recommend a Docker container build strategy that meets the following requirements
• Minimizes image sues
• Minimizes the security surface area of the final image
What should you include m the recommendation?
You haw an Azure subscription that contains multiple Azure services. You need to send an SMS alert when scheduled maintenance is planned for the Azure services. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
Your company has an Azure DevOps project,
The source code for the project is stored in an on-premises repository and uses on an on-premises build
server.
You plan to use Azure DevOps to control the build process on the build server by using a self-hosted agent.
You need to implement the self-hosted agent.
You download and install the agent on the build server.
Which two actions should you perform next? Each correct answer presents part of the solution.
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 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?
You need to ensure that Microsoft Visual Studio 2017 can remotely attach to an Azure Function named fa-11566895.
To complete this task, sign in to the Microsoft Azure portal.
You are evaluating the use of code review assignments in GitHub.
Which two requirements can be met by using code review assignments ' Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point
You have an Azure subscription that contains 50 virtual machines.
You manage the configuration of the virtual machines by using Azure Automation State Configuration.
You need to ensure that Windows Defender is installed on each virtual machine and the Windows Defender service is running.
How should you complete the Desired State Configuration (DSC) code? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag thesplit bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

You plan to create a GitHub workflow that will use GitHub Actions. The actions will require a 256-KB secret.
You need to recommend a solution to store and encrypt the secret. The secret value must be accessible only to the workflow. The solution must minimize administrative effort
What should you recommend?

You have an Azure Kubernetes Service (AKS) pod.
You need to configure a probe to perform the following actions:
Confirm that the pod is responding to service requests.
Check the status of the pod four times a minute.
Initiate a shutdown if the pod is unresponsive.
How should you complete the YAML configuration file? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Your company wants to use Azure Application Insights to understand how user behaviors affect an application.
Which Application Insights tool should you use to analyze each behavior? To answer, drag the appropriate tools to the correct behaviors. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
You use GitHub Enterprise for source control repositories. The repositories store C# code. You need to enable CodeQL scanning for the repositories. What should you do?
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 integrate a cloud-hosted Jenkins server and a new Azure DevOps deployment.
You need Azure DevOps to send a notification to Jenkins when a developer commits changes to a branch in Azure Repos.
Solution: You create a service hook subscription that uses the build completed event
Does this meet the goal?
You have multiple teams that work on multiple projects in Azure DevOps.
You need to plan and manage the consumers and producers for each project. The solution must provide an overview of all the projects.
What should you do?
You have an Azure Pipeline.
You need to store configuration values as variables.
At which four scopes can the variables be defined, and what is the precedence of the variables from the highest precedence to lowest precedence? To answer, move the appropriate scope from the list of scopes to the answer area and arrange them in the correct order.

Your company plans to deploy an application to the following endpoints:
• Ten virtual machines hosted in Azure.
• Ten virtual machines hosted in an on-premises data center environment
All the virtual machines have the- Azure Pipelines agent.
You need to implement a release strategy for deploying the application to the endpoints.
What should you recommend using to deploy the application to the endpoints? To answer, drag the appropriate components to the correct endpoint.
Each component may be used once, more than once, or not at all. You may need to drag the split bar between panes or soon to view content
NOTE: Each correct selection n worth one point.

Your company is building a mobile app that targets Android devices and OS devices. Your team uses Azure DevOps to manage all work items and release cycles. You need to recommend a solution to perform the following tasks:
• Collect crash reports for issue analysis
• Distribute beta releases to your testers.
• Get user feedback on the functionality of new apps.
What should you include in the recommendation?
You create an alert rule in Azure Monitor as shown in the following exhibit.

Which action will trigger an alert?
Note: This question is part of a series les 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 m this section, you will NOT be able to return to it As a result, these questions will not appear in the review screen
You integrate a cloud-hosted Jenkins server and a new Azure Dev Ops deployment.
You need Azure Dev Ops lo send a notification to Jenkins when a developer commits changes to a branch in Azure Repos.
Solution: You create an email subscription to an Azure DevOps notification.
Does this meet the goal?
You are using GitHub as a source code repository.
You create a client-side Git hook on the commit-msg event. The hook requires that each commit message contain a custom work item tag.
You need to make a commit that does not have a work item tag.
Which git commit parameter should you use?
How should you confrere the release retention policy for the investment planning depletions suite? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Which package feed access levels should be assigned to the Developers and Team Leaders groups for the investment planning applications suite? To answer, drag the appropriate access levels to the correct groups. Each access level may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

How should you configure the release retention policy for the investment planning applications suite? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

What should you use to implement the code quality restriction on the release pipeline for the investment planning applications suite?
Where should the build and release agents for the investment planning application suite run? To answer, select the appropriate options in the answer area.
NOTE : Each correct selection is worth one point.

How should you complete the code to initialize App Center in the mobile application? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection a worth one point.

HOTSPOT
You are using PowerShell to administer Azure Log Analytics workspaces.
You need to list the available workspaces and their properties.
How should you complete the command? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

To resolve the current technical issue, what should you do to the Register-AzureRmAutomationDscNode command?
You have Azure Pipelines and GitHub integrated as a source code repository.
The build pipeline has continuous integration enabled.
You plan to trigger an automated build whenever code changes are committed to the repository.
You need to ensure that the system will wait until a build completes before queuing another build.
What should you implement?
HOTSPOT
You have an Azure virtual machine named VM1 that runs Linux.
You plan to deploy the Desired State Configuration (DSC) extension to VM1.
You need to grant the Log Analytics agent the appropriate directory permissions.
How should you complete the command? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Which branching strategy should you recommend for the investment planning applications suite?
You need to configure a cloud service to store the secrets required by the mobile applications to call the share.
What should you include in the solution? To answer, select the appropriate options m the answer area, NOTE: Each correct selection is worth one point.

You have a project in Azure DevOps.
You plan to deploy a self-hosted agent by using an unattended configuration script.
Which two values should you define in the configuration script? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
You need to implement Project6.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them m the correct order.

You need to configure Azure Automation for the computers in Pool7.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them m the correct order.

You add the virtual machines as managed nodes in Azure Automation State Configuration.
You need to configure the computer in Group7.
What should you do?
In Azure DevOps, you create Project3.
You need to meet the requirements of the project.
What should you do first?
You need to configure Azure Automation for the computer in Group7.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

How should you configure the filters for the Project5 trigger? To answer, select the appropriate option in the answer area.
NOTE: Each correct selection is worth one point.

You need to recommend a procedure to implement the build agent for Project1.
Which three actions should you recommend be performed in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

You need to implement the code flow strategy for Project2 in Azure DevOps.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

You need to implement the code flow strategy for Project2 in Azure DevOps.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange in the correct order.

You need to meet the technical requirements for controlling access to Azure DevOps.
What should you use?
You need to the merge the POC branch into the main branch. The solution must meet the technical requirements.
Which command should you run?
You plan to deploy a new database environment. The solution must meet the technical requirements. You need to prepare the database for the deployment. How should you format the export?
You need to configure Azure Pipelines to control App2 builds.
Which authentication method should you use?
You need to meet the technical requirements for monitoring App1.
What should you use?
You need !0 the merge the POC branch into the default branch. The solution must meet the technical requirements. Which command should you run?
You need to configure the alert for VM1. The solution must meet the technical requirements.
Which two settings should you configure? To answer, select the appropriate settings in the answer area.
NOTE: Each correct selection is worth one point.

You need to replace the existing DevOps tools to support the planned changes.
What should you use? To answer, drag the appropriate tools to the correct targets. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

You need to perform the GitHub code migration. The solution must support the planned changes for the DevOps environment.
What should you use?
You need to configure authentication for App1. The solution must support the planned changes.
Which three actions should you perform in sequence? To answer, move all actions from the list of actions to the answer area and arrange them in the correct order.

You are configuring the Azure DevOps dashboard. The solution must meet the technical requirements.
Which widget should you use for each metric? To answer, drag the appropriate widgets to the correct metrics. Each widget may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

You use Calendar Versioning (CalVer) for code assets.
You need to store an optional tag of beta as part of the version.
Which part of the version should you use for the tag?
You need to make a custom package available to all the developers. The package must be managed centrally, and the latest version must be available for consumption in Visual Studio automatically.
Which three actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
You have an Azure web app named Webapp1.
You need to use an Azure Monitor query to create a report that details the top 10 pages of Webapp1 that failed.
How should you complete the query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You have a web app that connects to an Azure SQL Database named db1.
You need to configure db1 to send Query Store runtime statistics to Azure Log Analytics.
To complete this task, sign in to the Microsoft Azure portal.
You have an Azure DevOps organization named Contoso and art Azure subscription The subscription contains an Azure virtual machine scale set named VMSS1 that is configured for autoscaling.
You use Azure DevOps to build a web app named Appl and deploy Appl to VMSS1. Appl is used heavily and has usage patterns that vary on a weekly basis.
You need to recommend a solution to detect an abnormal rise in the rate of failed requests to Appl. The solution must minimize administrative effort.
What should you include in the recommendation?
You manage a project by using Azure Boards. You manage the project code by using GitHub.
You have three work items that have IDs of 456. 457. and 458.
You need to create a pull request that will be linked to all the work items. The solution must set the state of work item 456 to done.
What should you add to the commit message?
A)

B)

C)

D)

You are developing an application. The application source has multiple branches.
You make several changes to a branch used for experimentation.
You need to update the main branch to capture the changes made to the experimentation branch and override the history of the Git repository.
Which Git option should you use?
You have an infrastructure as code (laC) solution that is managed by using Bicep files and Azure Pipelines.
You need to ensure that pipeline actions that significantly affect the existing infrastructure are reviewed before they are run.
What should you configure?
You have a virtual machine that runs Windows Server 2022 and is managed by using PowerShell Desired State Configuration (PSDSC).
You have the following DSC configuration.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

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 need to recommend an integration strategy for the build process of a Java application. The solution must meet the following requirements:
The builds must access an on-premises dependency management system.
The build outputs must be stored as Server artifacts in Azure DevOps.
The source code must be stored in a Git repository in Azure DevOps.
Solution: Configure the build pipeline to use a Hosted VS 2017 agent pool. Include the Java Tool Installer task in the build pipeline.
Does this meet the goal?
Your company uses cloud-hosted Jenkins for builds.
You need to ensure that Jenkins can retrieve source code from Azure Repos.
Which three actions should you perform? Each correct answer presents part of the solution
NOTE: Each correct answer selection is worth one point
You have several apps that use an Azure SQLDatabase named db1.
You need to ensure that queries to db1 are tuned by Azure over time. The solution must only apply to db1.
To complete this task, sign in to the Microsoft Azure portal.
Task 7
You need to prepare a network security group (NSG) named az400 38443478 nsgl to host an Azure DevOps pipeline agent. The solution must allow only the required outbound port for Azure DevOps and deny all other inbound and outbound access to the Internet
You plan to deploy a solution that will include multiple microservices.
You need to recommend a deployment strategy for the microservices The solution must meet the following requirements:
• Enable testing and monitoring of changes during a gradual rollout.
• Control the number of users that will receive new code releases.
Which strategy should you recommend?
You have an Azure solution that contains a build pipeline in Azure Pipelines. You experience intermittent delays before the build pipeline starts. You need to reduce the time it takes to start the build pipeline. What should you do?
You plan to provision a self-hosted Linux agent
Which authentication mechanism should you use to register the self-hosted agent?
You need to create an instance of Azure Application Insights named az400-9940427-main and configure the instance to receive telemetry data from an Azure web app named az400-9940427-main.
To complete this task, sign in to the Microsoft Azure portal.
You have an Azure subscription that contains Azure DevOps build pipelines.
You need to implement pipeline caching by using the cache task.
How should you complete the YAML definition? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You plane to store signed images in anAzure Container Registry instance named az4009940427acr1.
You need to modify the SKU for az4009940427acr1 to support the planned images. The solution must minimize costs.
To complete this task, sign in to the Microsoft Azure portal.
You need to ensure that an Azure web app named az400-9940427-main can retrieve secrets from an Azure key vault named az400-9940427-kv1 by using a system managed identity.
Thesolution must use the principle of least privilege.
To complete this task, sign in to the Microsoft Azure portal.
Task 10
For Project1, you need to ensure that artifacts, symbols, and attachments are retained for 60 days.
You plan to deploy a website that will be hosted in two Azure regions.
You need to create an Azure Traffic Manager profile named az40011566895n1-tm in a resource group named RG1lod11566895. The solution must ensure that users will always connect to a copy of the website that is in the same country.
To complete this task, sign in to the Microsoft Azure portal.
You have a web app named Appl.
You need to recommend a deployment strategy for App1 that meets the following requirements:
• Ensures that you can deploy new builds of App1 without exposing new functionalities to all users
• Ensures that you can target a specific subsection of users to test the new functionalities
What should you include in the recommendation?
Task 12
In Project 1. you need to ensure that you can add the following iterations to items added tc Az-fe Ecards:
• Sprint 1
• Sprint 2
• Sprint 3
Sprint 3 must have a start date of January 1 of next year and an end date of Januan / 31 of next year.
You are designing a build and release pipeline.
You need to implement a shift-left testing strategy for the pipeline.
Which types of tests should you include?
Task 2
You need to create an instance of AzureApplication Insights named az400-38443478-main and configure the instance to receive telemetry data from an Azure web app named az400-38443478-main
You must create a Log Analytics workspace before this task.
Task 5
For Project1, you need to create a project wiki named Wiki1 that uses the Mermaid syntax to render a diagram A sample of the desired output is stored in C:\Resources\TCPHandshake.png.
You are using Agile process methodologies and Azure Boards in Azure DevOps. You import the work items shown in the following table.

You need to categorize the items.
Which state should you assign to each item? To answer, drag the appropriate states to the correct isms. Each state may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

You have a Bicep file named Main.bicep.
You run the following command.

Use the drop-down menus to select the answer choice that completes each statement based on the information presented.
NOTE: Each correct selection is worth one point.

Task 6
You have an Azure function hosted in an App Service plan named az400-38443478-funct
You need to configure az400 38443478-funcl lo update the functions automatically whenever new code is committedto the main branch of https://githubcom/Azure-Samples/functions-quickstart.
NOTE: Access to GitHub is blocked in the exam environment. Access to GitHub is NOT required to complete the task successfully.
You need to prepare a network security group (NSG) named az400-9940427-nsg1 to host an Azure DevOps pipeline agent. The solution must allow only the required outbound port for Azure DevOps and deny all other inbound and outbound access to the Internet.
To complete this task, sign in to the Microsoft Azure portal.
Task 1
Navigate to https://dev.azure.com, select Start Free, and specify the following credentials:
• UserUsefl-42147509@ExamUsers.com
• Password: eWrSalD2!
Use the default setting to sign up for Azure DevOps and create an Azure DevOps organization. Once the organization is created. creates private project named Project1.
You need to add an external userthat has an email address of Usfrr2-42147S09@ExamUsers.com as a stakeholder of the User1 -42147509 Azure DevOps organization.
The user must be added to the most restrictive Azure DevOps group.
To complete this task, sign in to the Azure DevOps portal asUserl-42147509©ExamUsers.com.
Task 3
You need to ensure that an Azure Web App named az400-38443478-matn supports rolling upgrades The solution must ensure that only 10 percent of users who connect to az400-38443478 main use updated versions of the app. The solution must minimize administrative effort.
You need to ensure that Microsoft Visual Studio 2017 can remotelyattach to an Azure Function named fa-11566895.
To complete this task, sign in to the Microsoft Azure portal.
You are designing a build and release pipeline.
You need to implement continuous integration and continuous delivery (CI/CD) for the pipeline
Which automated activities should you include in the pipeline?
You have an Azure DevOps subscription that contains two projects named Project 1 and Project2. The projects contain the jobs shown in the following table.

You purchase two parallel jobs.
At 10:00 AM, you queue JobA and JobB. At 10:05 AM, you queue JobC.
When will JobC run?
You have a web app that connects to an Azure SQL Database named db1.
You need to configure db1 to send Query Store runtime statistics to Azure Log Analytics.
To complete this task, sign in to the Microsoft Azure portal.
You have a GitHub Actions workflow named workflow1 that is used to deploy an app name Appl. You need to ensure that App1 is deployed only when the following conditions are met:
• A pull request is merged to the main branch.
• The change includes a JavaScript file.
Solution. You configure the YAML file of workflow1 to include the following.

Does this meet the goal?
You need to configure an Azure web app named az400-9940427-main to contain an environmental variable named “MAX_ITEMS”. The environmental variable must have a value of 50.
To complete this task, sign in to the Microsoft Azure portal.
You have an Azure DevOps organization.
You are designing an automated security and compliance solution that will use GitHub Advanced Security for Azure DevOps.
You need to ensure that security checks and compliance requirements are enforced automatically throughout the development lifecycle.
Which two features should you include in the solution? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Task 10
You need to create a variable group named varGroup1 that will contain the following variables and default values:
• username: Userl-48901628
• password: aFpJ2j+6M!
The PASSWORD variable must be secret.
Task 4
Initialize the default main branch, if it does not exist already.
In the Userl-42147509 Azure DevOps project, you need to implement an approval process for the default main branch.
The process must use the four-eyes principle and have at least one approval on every iteration.
You need to create a virtual machine template in an Azure DevTestLabs environment named az400-9940427-dtl1. The template must be based on Windows Server 2016 Datacenter. Virtual machines created from the template must include the selenium tool and the Google Chrome browser.
To complete this task, sign in to the Microsoft Azure portal.
You have an Azure functionhosted in an App Service plan named az400-9940427-func1.
You need to configure az400-9940427-func1 to upgrade the functions automatically whenever new code is committed to the master branch of https://github.com/Azure-Samples/functions-quickstart.
To complete this task, sign in to the Microsoft Azure portal.
You have an Azure subscription that contains a resource group named RG1.
You have a template artifact named template1.
You plan to use Azure Pipelines to deploy an app named App1 to RG1. App1 requires template1.
You need to deploy template1 to RG1.
How should you configure the pipeline task? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

Task 8
You need to ensure that the https://contoso.com/statushook webhookis called every time a repository named az40038443478acr 1 receives a new version of an image named dotnetapp
You have a GitHub repository.
A file that contains secrets is committed and pushed to the repository accidentally.
You need to perform the following actions:
• Remove the file from the repository.
• Remove all commits that include the file from the repository.
The solution must minimize administrative effort. What should you use?
You have a widget named Appl and an Azure DevOps YAML pipeline named Pipelinel. App1 is released by using Pipelined Pipeline1 contains a single stage and a single job. You need to ensure that Appl is approved before the app is released. Which two actions should you perform? Each correct answer presents part of the solution. NOTE; Each correct selection is worth one point.
Task 4
Youneed to configure a virtual machine template in a DevTest Labs environment named az400-38443478-dtl1. The operating system must be based on Windows Server 2016 Datacenter. Virtual machines created from the DevTest Lab must include the Selenium tool and theGoogle Chrome browser.
You have a GitHub Actions workflow named workflow! that is used to deploy an app name Appl. You need to ensure that App1 is deployed only when the following conditions are met:
• A pull request is merged to the main branch.
• The change includes a JavaScript file.
Solution. You configure the YAML file of workflowl to include the following.

Does this meet the goal?
Task 11
You need to create a new artifact feed named artifact_feed.
Only 10 versions of the packages must be retained, and downloaded packages must be retained for 90 days.





Graphical user interface, text, application
Description automatically generated
Text
Description automatically generated


























C:\Users\wk\Desktop\mudassar\Untitled.jpg














Graphical user interface, text, application
Description automatically generated
A picture containing text
Description automatically generated
Graphical user interface, text, application
Description automatically generated
Graphical user interface, text, application
Description automatically generated


















