You have an Azure key vault named KV1 and three web servers.
You plan to deploy an app named App1 to the web server.
You need to ensure that App1 can retrieve a secret from KV1.
The solution must meet the following requirements:
Minimize the number of permission grants required
Follow the principle of least privilege.
What should you include in the solution?
Show answerHide answer
Correct answer: Ba system-assigned managed identity
Question 62Choose 1
You have an Azure DevOps organization named Contoso, an Azure DevOps project
named Project1, an
Azure subscription named Sub1, and an Azure key vault named vault1.
You need to ensure that you can reference the values of the secrets stored in vault1 in all
the pipelines of Project1. The solution must prevent the values from being stored in the
pipelines.
What should you do?
Show answerHide answer
Correct answer: ACreate a variable group in Project1.
Explanation
Use a variable group to store values that you want to control and make available across
multiple pipelines.
Question 63Choose 1
You manage a project by using Azure Boards, and you manage the project code by using
Azure Repos. You have a bug work item that has an ID of 123. You need to set the work
item state to Resolved. What should you add to the commit message?
Show answerHide answer
Correct answer: AFixes #123
Question 64Choose 3
You have a GitHub repository that contains workflows. The workflows contain steps that
execute predefined actions. Each action has one or more versions.
You need to request the specific version of an action to execute.
Which three attributes can you use to identify the version? Each correct answer presents a
complete solution.
NOTE: Each correct selection is worth one point.
Show answerHide answer
Correct answer: A, B, Dthe SHA-based hashesthe tagthe branch
Explanation
"We strongly recommend that you include the version of the action you are using by
specifying a Git ref, SHA, or Docker tag. If you don't specify a version, it could break your
workflows or cause unexpected behavior when the action owner publishes an update.
Using the commit SHA of a released action version is the safest for stability and security. If
the action publishes major version tags, you should expect to receive critical fixes and
security patches while still retaining compatibility. Note that this behavior is at the discretion
of the action's author. Using the default branch of an action may be convenient, but if
someone releases a new major version with a breaking change, your workflow could
break."
Question 65Choose 1
You plan to create a project in Azure DevOps. Multiple developers will work on the project.
The developers will work offline frequently and will require access to the full project history
while they are offline.
Which version control solution should you use?
Show answerHide answer
Correct answer: DGit
Explanation
Git history: File history is replicated on the client dev machine and can be viewed even
when not connected to the server. You can view history in Visual Studio and on the web
portal.
Note: Azure Repos supports two types of version control: Git and Team Foundation
Version Control (TFVC).
Question 66Choose 1
You have an Azure DevOps project that contains a release pipeline and a Git repository.
When a new code revision is committed to the repository, a build and release is triggered.
You need to ensure that release information for the pipeline is added automatically to the
work items associated to the Get commit. What should you do?
Show answerHide answer
Correct answer: AModify the Integrations options for the pipeline.
Explanation
Explanation: Service hooks in Azure DevOps allow you to trigger actions in other tools
based on events that occur in your Azure DevOps project. To automatically add release
information to work items associated with a Get commit, you would need to configure a
service hook that listens for commit events in your Get repository, and then sends the
release information to the appropriate work items.
Here's the steps you can follow to set up a service hook for this purpose:
In your Azure DevOps project, navigate to the project settings by clicking on the
gear icon in the top right corner of the page.
Select "Service Hooks" from the left-hand menu.
Click on the "New Subscription" button to create a new service hook.
In the "Event" drop-down menu, select "Code pushed" to trigger the service hook
when a new code revision is committed to the repository.
In the "Actions" section, select the action that you want to take place when the
service hook is triggered. For example, you might use the "Link work items to
commits" action to automatically associate work items with the relevant commits.
Configure the remaining settings as needed, and then click on the "Create" button
to create the service hook.
Question 67Choose 2
You plan to use Terraform to deploy an Azure resource group.
You need to install the required frameworks to support the planned deployment.
Which two frameworks should you install? Each correct answer presents part of the
solution.
NOTE: Each correct selection is worth one point.
Show answerHide answer
Correct answer: B, DTerratestYeoman
Explanation
You can use the combination of Terraform and Yeoman. Terraform is a tool for creating
infrastructure on Azure. Yeoman makes it easy to create Terraform modules.
Terratest provides a collection of helper functions and patterns for common infrastructure
testing tasks, like making HTTP requests and using SSH to access a specific virtual
machine. The following list describes some of the major advantages of using Terratest:
Convenient helpers to check infrastructure - This feature is useful when you want
to verify your real infrastructure in the real environment.
Organized folder structure - Your test cases are organized clearly and follow the
standard Terraform module folder structure.
Test cases are written in Go - Many developers who use Terraform are Go
developers. If you're a Go developer, you don't have to learn another programming
language to use Terratest.
Extensible infrastructure - You can extend additional functions on top of Terratest,
including Azure-specific features.
Question 68Choose 1
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 Appl. 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?
Show answerHide answer
Correct answer: BDeployment Environments User
Question 69Choose 2
Your company creates a web application.
You need to recommend a solution that automatically sends to Microsoft Teams a daily
summary of the exceptions that occur in the application.
Which two Azure services should you recommend? Each correct answer presents part of
the solution.
NOTE: Each correct selection is worth one point.
Show answerHide answer
Correct answer: A, EAzure Logic AppsAzure Application Insights
Explanation
E: Exceptions in your live web app are reported by Application Insights.
Note: Periodical reports help keep a team informed on how their business critical services
are doing. Developers, DevOps/SRE teams, and their managers can be productive with
automated reports reliably
delivering insights without requiring everyone to sign in the portal. Such reports can also
help identify gradual increases in latencies, load or failure rates that may not trigger any
alert rules.
A: You can programmatically query Application Insights data to generate custom reports on
a schedule. The following options can help you get started quickly:
Automate reports with Microsoft Flow
Automate reports with Logic Apps
Question 70Choose 1
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.
Your company has a project in Azure DevOps for a new web application.
You need to ensure that when code is checked in, a build runs automatically.
Solution: From the Pre-deployment conditions settings of the release pipeline, you select
After stage.
Does this meet the goal?
Show answerHide answer
Correct answer: BNo
Explanation
Instead, In Visual Designer you enable continuous integration (CI) by:
Select the Triggers tab.
Enable Continuous integration.
Full mock exam
Sit the AZ-400 exam before exam day
Full-length mocks with the same number of questions and the same time limit as the real AZ-400 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.