You have an Azure subscription that contains four Azure virtual machines.
You need to configure the virtual machines to use a single identity. The solution must meet the following requirements:
• Ensure that the credentials for the identity are managed automatically.
• Support granting privileges to the identity.
Which type of identity should you use?
A. a system-assigned managed identity
B. a user-assigned managed identity
C. a service principal
D. a user account
Show Answer
Correct Answer: B
Explanation: A user-assigned managed identity can be associated with multiple Azure virtual machines, allowing them to share a single identity. Its credentials are managed automatically by Azure, and you can grant it permissions via Azure RBAC, meeting all stated requirements.
Question 146
DRAG DROP
-
You have a GitHub repository named repo1.
You migrate repo1 to an Azure Repos repository named repo2.
After the migration, changes are made to repo1.
You need to sync the changes to repo2.
How should you complete the script? 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.
Explanation: To sync later changes, you clone the Azure Repos destination (repo2) as a bare repository, work inside its folder, add the original GitHub repository (repo1) as an upstream mirror, fetch updates from repo1, and push them to repo2.
Question 147
DRAG DROP
-
You have a GitHub organization that contains three users named User1, User2, and User3. You have a project that contains a repository named repo1.
You need to configure permissions for repo1. The solution must meet the following requirements:
• Ensure that User1 can actively push to repo1.
• Ensure that User2 can manage issues and pull requests for repo1.
• Ensure that User3 can manage repo1.
• Prevent User3 from accessing sensitive data in repo1.
Which role should you assign to each user? To answer, drag the appropriate roles to the correct users. Each role 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.
Explanation: Write allows pushing code. Triage allows managing issues and pull requests without write access. Maintain allows managing repository settings and workflows without full admin access to sensitive data such as secrets.
Question 148
HOTSPOT
-
You are using Agile process methodologies in Azure DevOps.
You need to deploy a dashboard that will provide progress reports for the following work items:
• How long it took to close a work item after it was created.
• How long it took to close a work item after the work was started.
Which type of widget should you use for each work item? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: Lead time
Cycle time
Explanation: Lead time measures the duration from work item creation to closure. Cycle time measures the duration from when work actively starts to when it is closed.
Question 149
You use GitHub for source control and Microsoft Teams for collaboration.
You need to send a notification to a Teams channel for each commit. The solution must minimize development effort.
What should you do?
A. Use Azure Automation to connect to the GitHub Actions API and send a message to the Teams channel.
B. Use the Microsoft Teams for GitHub app and configure a subscription to receive notifications in the Teams channel.
C. Use GitHub Actions with a dispatch to send a message to the Teams channel by using the Teams API.
D. Use Azure Functions to connect to the GitHub REST API and send a message to the Teams channel.
Show Answer
Correct Answer: B
Explanation: The Microsoft Teams for GitHub app provides a built-in integration that can subscribe a Teams channel to GitHub events such as commits. This requires minimal configuration and no custom development, unlike Azure Automation, GitHub Actions, or Azure Functions solutions.
Question 150
You plan to create an image that will contain a .NET Core application.
You have a Dockerfile file that contains the following code. (Line numbers are included for reference only.)
You need to ensure that the image is as small as possible when the image is built.
Which line should you modify in the file?
A. 1
B. 3
C. 4
D. 7
Show Answer
Correct Answer: C
Explanation: To minimize the final image size for a .NET Core application, the Dockerfile should use a runtime (or aspnet) base image instead of the larger SDK image. Modifying line 4 changes the base image for the final stage to a smaller runtime-only image, which significantly reduces the image size.
Question 151
You have an Azure subscription that contains the resources shown in the following table.
DepPipeline1 and ADFPipeline1 use a single credential that is stored in Vault1.
You need to configure ADFPipeline1 to retrieve the credential from Vault1.
Which type of activity should you use?
A. Lookup
B. Get Metadata
C. Сoрy
D. Web
Show Answer
Correct Answer: D
Explanation: In Azure Data Factory, retrieving a secret directly from Azure Key Vault at runtime is done by calling the Key Vault REST API. This is accomplished using a Web activity, which can issue an HTTP GET request to Key Vault to fetch the credential. Lookup, Get Metadata, and Copy activities are designed for data inspection or movement, not for calling REST endpoints to retrieve secrets.
Question 152
SIMULATION -
You have an Azure function hosted in an App Service plan named az400-123456789-func1.
You need to configure az400-123456789-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.
Explanation: Configure Deployment Center with GitHub as the source and enable continuous deployment on the master branch so the Function App automatically updates whenever new code is committed.
Question 153
DRAG DROP
-
You have a GitHub repository named repo1 that stores the code of an app named App1.
You need deploy a workflow for repo1 by using GitHub Actions. The solution must meet the following requirements:
• Scan on pushes to the main branch.
• Scan on pull requests to the main branch.
• Scan on pull requests to any branch that has a prefix of releases/.
• Scan all the files in the subdirectories of the src directory.
• Exclude scanning of markdown files.
How should you complete the 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 the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Explanation: The workflow triggers on pushes to main and pull requests targeting main or any branch prefixed with releases/. The src/** path ensures all files in src subdirectories are scanned, while **/*.md excludes all Markdown files at any directory level.
Question 154
DRAG DROP -
You have an Azure DevOps pipeline that is used to deploy a Node.js app.
You need to ensure that the dependencies are cached between builds.
How should you configure the deployment YAML? 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.
Explanation: The Cache@2 task sets CACHE_RESTORED to true on a cache hit. The script step runs only when the cache is not restored, ensuring dependencies are installed/built when needed while reusing cached npm dependencies between builds.
$19
Get all 531 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.