Microsoft

AZ-400 Free Practice Questions — Page 4

Question 32

You use Azure Pipelines to build and test code. You need to analyze the agent pool usage. What are two ways to achieve the goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A. Review the historical graph for the agent pools.
B. Review the Pipeline duration report.
C. Query the TaskAgentPoolSizeSnapshot/TaskAgentPoolSizeSnapshots endpoint.
D. Query the PipelineRun/PipelineRuns endpoint.
Show Answer
Correct Answer: A, C
Explanation:
Agent pool usage can be analyzed either through the built-in historical graph for agent pools (pool consumption report) or programmatically through the Analytics TaskAgentPoolSizeSnapshot/TaskAgentPoolSizeSnapshots endpoint, which exposes agent pool size and usage history. The Pipeline duration report focuses on pipeline execution times rather than agent pool utilization, and PipelineRun entities provide run data rather than agent pool usage metrics.

Question 33

DRAG DROP - You have an Azure subscription that contains an Azure Traffic Manager profile named ATM1 and a web app named App1. ATM1 manages App1 traffic. ATM1 is configured to route callers to the endpoint that has the lowest latency. You need to configure ATM1 to route all traffic from Asia to an endpoint in Australia. Which three actions should you perform in sequence from the Azure portal? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Illustration for AZ-400 question 33
Show Answer
Correct Answer: Delete all the existing endpoints. Configure geographic routing. Add new endpoints that have geographic region mapping.
Explanation:
To change an existing Traffic Manager profile from Performance to Geographic routing in the Azure portal, remove the existing endpoints first, switch the routing method to Geographic, then recreate endpoints with geographic region mappings (such as mapping Asia to the Australia endpoint).

Question 34

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 use an Azure Pipelines pipeline to test an app. The solution meet the following requirements: • The pipeline must fail if any tests fail. • The test results must be published to the pipeline. • The test for every pipeline run must be triggered unless the pipeline is cancelled. Solution: You include the following elements in the YAML definition of the pipeline. Does this meet the goal?

A. Yes
B. No
Show Answer
Correct Answer: A
Explanation:
Yes. A PublishTestResults@2 task configured with failTaskOnFailedTests: true will fail the task if any tests fail while still publishing the test results. Using the condition not(canceled()) causes the publish step to run for every pipeline execution except when the pipeline has been canceled, satisfying the stated requirements in the described solution.

Question 35

SIMULATION - You need to write a KQL query that will count the number of inbound requests for each source IP address, for any connection made during the last three months of 2021. On Azure Data Explorer by using the following link: https://dataexplorer.azure.corn/clusters/help/databases/SecurityLogs The requests are contained in a table named InboundBrowsing in the SecurityLogs connection. The query must return two columns named NumberOfRequests and SourceIP. Export the query result to C:\Samples.

Show Answer
Correct Answer: InboundBrowsing | extend timestamp = todatetime(timestamp) | where timestamp between (datetime(2021-10-01) .. datetime(2022-01-01)) | summarize NumberOfRequests = count() by SourceIP = src_ip | project NumberOfRequests, SourceIP | export to csv (h@"C:\Samples")
Explanation:
Filter to the last three months of 2021, count requests grouped by source IP, return the required column names, then export the results to the specified folder.

Question 36

You have a GitHub repository. You need to ensure that all changes to code are validated by your company’s security department before the main branch is deployed. Which two actions can you perform? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A. Require signed commits.
B. Create a branch protection rule for the feature branches.
C. Create a LICENSE file.
D. Create a branch protection rule for the main branch.
E. Create a CODEOWNERS file.
Show Answer
Correct Answer: D, E
Explanation:
Use branch protection on the main branch to require pull requests and approvals before changes can be merged and deployed. Add a CODEOWNERS file assigning the security department as code owners for the relevant paths, then enable required review from code owners via branch protection so their approval is mandatory. Requiring signed commits only verifies commit signatures, not security review, and protecting feature branches alone does not ensure the main branch receives the required validated changes.

Question 37

You have a GitHub repository. You need to create a tag named v3.0.5 and ensure that the tag is available in the remote repository. Which two commands should you run? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A. git push -force
B. git push origin v3.0.5
C. git tag v3.0.5
D. git commit -m ‘tag v3.0.5’
E. git add ‘tag v3.0.5’
Show Answer
Correct Answer: B, C
Explanation:
Create the tag locally with `git tag v3.0.5`, then push that specific tag to the remote with `git push origin v3.0.5`. Creating a tag does not automatically upload it to the remote repository.

Question 38

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?

A. Enable Dependabot security updates.
B. Enable Dependabot alerts.
C. Configure a required GitHub Actions workflow for all the repositories.
D. Push a GitHub Actions workflow to all the repositories.
Show Answer
Correct Answer: D
Explanation:
CodeQL scanning on GitHub Enterprise is enabled by adding a CodeQL GitHub Actions workflow to each repository. The workflow initializes CodeQL, builds the C# project, performs analysis, and uploads results. Dependabot alerts and security updates are for dependency vulnerability management, not static code analysis. A required workflow can enforce execution if available, but it does not itself enable CodeQL unless the workflow exists in the repositories or is otherwise configured; the direct action to enable scanning is to add the CodeQL workflow.

Question 39

You are developing an Azure Pipelines pipeline. You need to configure a check in the pipeline that will query Azure Boards to ensure that there are no active work item issues before the pipeline deploys a build to production. Which type of check should you implement?

A. post-deployment approvals
B. manual validations
C. pre-deployment gates
D. pre-deployment approvals
Show Answer
Correct Answer: C
Explanation:
Pre-deployment gates can automatically query external services such as Azure Boards before a deployment proceeds. They are designed to validate conditions (for example, ensuring there are no active work items or incidents) before deploying to an environment. Pre-deployment approvals require human approval, post-deployment approvals occur after deployment, and manual validations are pipeline tasks for human intervention rather than automated Azure Boards checks.

Question 40

You have an Azure subscription that includes an app named App1. You have an Azure DevOps project that contains two environments named Staging and Production. You use Azure Pipelines to deploy App1. You need to validate the performance of App1 in the Staging environment before it is deployed to Production. The solution must minimize administrative effort. What should you do in the Azure DevOps project?

A. In the production branch policy, add a status check to query Azure Monitor Alerts for active alerts.
B. In the Production environment, add a check to query Azure Monitor Alerts for active alerts.
C. In the Production environment stage, add a post-deployment approval for the Azure Monitor Alerts group.
D. In the Staging environment add a check to query Azure Monitor Alerts for active alerts.
Show Answer
Correct Answer: B
Explanation:
Environment checks are evaluated before deployment to the target environment. To validate staging performance before promoting to production with minimal administration, configure an Azure Monitor Alerts check on the Production environment. Before the production deployment starts, Azure DevOps queries Azure Monitor; if alerts from the staging deployment are active, the deployment to Production is blocked. Sources: https://learn.microsoft.com/en-us/azure/devops/pipelines/architectures/devops-pipelines-baseline-architecture?view=azure-devops

Question 41

You manage package feeds by using Azure Artifacts. You plan to create a new package feed that will include the following views: • @Local • @Latest • @Release • @Prerelease Which view should you create manually?

A. @Local
B. @Latest
C. @Release
D. @Prerelease
Show Answer
Correct Answer: B
Explanation:
Azure Artifacts feeds are created with three default views: @Local, @Prerelease, and @Release. A view named @Latest is not created by default, so it must be added manually. Therefore, to have the four listed views (@Local, @Latest, @Release, @Prerelease), you must manually create @Latest.

$19

Get all 534 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.