Microsoft

AZ-400 Free Practice Questions — Page 14

Question 135

HOTSPOT - You have an Azure subscription that contains an Azure key vault named Vault1, an Azure pipeline named Pipeline1, and an Azure SQL database named DB1. Pipeline1 is used to deploy an app that will authenticate to DB1 by using a password. You need to store the password in Vault1. The solution must ensure that the password can be accessed by Pipeline1. What should you do? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 135
Show Answer
Correct Answer: Secret Access policies
Explanation:
Passwords are stored in Azure Key Vault as secrets. Azure Pipelines access to Key Vault secrets is granted by configuring Key Vault access policies that allow the pipeline (service principal/managed identity) to read secrets.

Question 136

You are creating a dashboard in Azure Boards. You need to visualize the time from when work starts on a work item until the work item is closed. Which type of widget should you use?

A. cycle time
B. velocity
C. cumulative flow
D. lead time
Show Answer
Correct Answer: A
Explanation:
Cycle time measures the duration from when work starts on a work item (for example, when it enters an Active or In Progress state) until it is completed or closed. Lead time, by contrast, measures from creation to completion, while velocity and cumulative flow do not directly show start-to-close duration for individual work items.

Question 137

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. Fixes #456, #457, #458
B. Fixes #AB456, #AB457, #AB458
C. #456, #457, #458 Completed #456
D. #AB456, #AB457, #AB458
Show Answer
Correct Answer: B
Explanation:
When linking Azure Boards work items from GitHub, you must reference them using the AB#<ID> syntax. Using the keyword "Fixes" causes Azure Boards to automatically transition the first referenced work item to the Completed/Done state, while linking all listed items. Therefore, "Fixes #AB456, #AB457, #AB458" links all three work items and sets work item 456 to Done.

Question 138

You have a GitHub repository that is integrated with Azure Boards. Azure Boards has a work item that has the number 715. You need to ensure that when you commit source code in GitHub, the work item is updated automatically. What should you include in the commit comments?

A. the URL of the work item
B. AB#715
C. @715
D. #715
Show Answer
Correct Answer: B
Explanation:
When GitHub is integrated with Azure Boards, commit messages can automatically link and update Azure Boards work items by including the keyword AB# followed by the work item ID. Using "AB#715" in the commit comment causes Azure Boards to recognize the reference and update work item 715. Other formats like #715 or @715 do not trigger this integration behavior in GitHub commits.

Question 139

HOTSPOT - You have an Azure virtual machine named web1. You need to query the amount of free memory that was available on web1 during the past seven days. The solution must meet the following requirements: • Display the data as a time chart. • Calculate the average value per hour. How should you complete the KQL query? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 139
Show Answer
Correct Answer: TimeGenerated > ago(7d) bin(TimeGenerated, 1h)
Explanation:
To query data from the past seven days, filter records where TimeGenerated is greater than ago(7d). To calculate and display the average free memory per hour as a time chart, aggregate using avg(CounterValue) grouped by bin(TimeGenerated, 1h).

Question 140

You use Azure Pipelines to build and deploy an app named App1. You plan to monitor App1 by using Application Insights. You create an Application Insights instance named AI1. You need to configure App1 to use AI1. Which file should you modify?

A. appsettings.json
B. launchSettings.json
C. startup.cs
D. project.json
Show Answer
Correct Answer: A
Explanation:
To configure an application to use a specific Application Insights instance (AI1), you must provide the Instrumentation Key or Connection String. This configuration value is stored in configuration files, most commonly appsettings.json. Startup.cs is used to enable or wire up Application Insights, but it does not identify which Application Insights resource to use. launchSettings.json is for local debugging only, and project.json is deprecated.

Question 141

DRAG DROP - You have a web app named App1 that uses Application Insights in Azure Monitor. You need to compare the hourly CPU usage of App1 from the last 24 hours. The solution must include a graph that has a threshold line at 75 percent. How should you complete the query? 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.

Illustration for AZ-400 question 141
Show Answer
Correct Answer: bin(TimeGenerated, 1h) extend
Explanation:
Hourly comparison requires binning TimeGenerated into 1-hour intervals. Adding a threshold line at 75 percent is done by extending a constant column (Threshold = 75) that can be rendered as a reference line in the chart.

Question 142

You have a project in Azure DevOps named Project1. Project1 contains a build pipeline named Pipe1 that builds an application named App1. You have an agent pool named Pool1 that contains a Windows Server 2022-based self-hosted agent. Pipe1 uses Pool1. You plan to implement another project named Project2. Project2 will have a build pipeline named Pipe2 that builds an application named App2. App1 and App2 have conflicting dependencies. You need to minimize the possibility that the two build pipelines will conflict with each other. The solution must minimize infrastructure costs. What should you do?

A. Add another self-hosted agent.
B. Add a Docker Compose task to the build pipelines.
C. Change the self-hosted agent to use Red Hat Enterprise Linux (RHEL) 9.
D. Create two container jobs.
Show Answer
Correct Answer: D
Explanation:
Using container jobs allows each pipeline to run inside its own isolated container with its own dependencies, preventing conflicts between App1 and App2 while still using the same self-hosted agent. This approach minimizes infrastructure costs because you do not need to add additional agents or servers.

Question 143

You have a public GitHub repository named Public1. A commit is made to Public1. The commit contains a pattern that matches a regular expression. Who is notified first when the commit is made?

A. the administrator of the GitHub organization
B. the committer
C. the owner of Public1
D. the secret scanning partner
Show Answer
Correct Answer: D
Explanation:
In public repositories, GitHub secret scanning checks commits for patterns that match known secret formats. When a match is detected, GitHub notifies the relevant secret scanning partner (the service provider) first so they can validate and revoke the exposed credential if needed, before repository owners or administrators are alerted.

Question 144

You manage code by using GitHub. You need to ensure that repository owners are notified if a new vulnerable dependency or malware is found in their repository. What should you do?

A. Configure CodeQL scanning actions.
B. Configure Dependabot alerts.
C. Configure branch protection rules for each repository.
D. Subscribe all the repository owners to the GitHub Advisory Database.
Show Answer
Correct Answer: B
Explanation:
Dependabot alerts automatically notify repository owners when GitHub detects vulnerable dependencies or malware in their repositories. CodeQL focuses on code analysis, branch protection is unrelated, and the GitHub Advisory Database is informational rather than a notification mechanism.

$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.