Free Practice Questions for the Microsoft Azure AZ-400 Exam (2026 Updated)
At Marks4sure, we are dedicated to providing IT professionals with the most accurate and reliable preparation materials for the Microsoft AZ-400 exam. To support your certification journey, we have made a selection of our premium 2026 Microsoft Azure practice questions and answers available completely free. You can take this practice test as many times as you need. Every question includes a detailed, expertly verified explanation to ensure you fully grasp the core security concepts before test day.
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 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?
You have a GitHub organization that contains a repository and an organizational secret named DB.Credential. You need to build a workflow that will configure a server by using PowerShell and DB.Credential. How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Task 3
Initialize the default main branch, if it floes not already exist.
You need to protect the main branch of the Project l repository to ensure that all changes are processed by using a pull request that has traceability to a work item.
Task 10
For Project1, you need to ensure that artifacts, symbols, and attachments are retained for 60 days.
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.
You need to create a notification if the peak average response time of an Azure web app named az400-9940427-main is more than five seconds when evaluated during a five-minute period. The notification must trigger the “https://contoso.com/notify” webhook.
To complete this task, sign in to the Microsoft Azure portal.
Task 9
Initialize the default main branch, if it does not exist already.
You need to create a pipeline that will execute a .NET Core build task for the src directory.
The pipeline code must be stored in a new branch named azure-pipelinesT.
The pipeline must run automatically when a pull request against the mam branch is created or updated.
Task 3
You need to create a new team dashboard named Dashboard1 for the default project team of Project1. The dashboard must display the members of the team
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.

You have a project in Azure DevOps that will use infrastructure as code (laC) to deploy resources to Azure and Amazon Web Services (AWS). You need to recommend a deployment solution for the project. The solution must minimize administrative effort. What should you include in the recommendation?
You need to ensure that the https://contoso.com/statushook webhook is called every time a repository named az40010480345acr1 receives a new version of an image named dotnetapp.
To complete this task, sign in to the Microsoft Azure portal.
You use GitHub Enterprise to manage source code and deployments.
From GitHub Actions, you create a reusable workflow named workflow 1.
You need to ensure that the secrets defined in the calling workflow are passed to workflow1.
What should you include in the YAML file for the calling workflow?
You need to ensure that an Azure web app named az400-9940427-main supports rolling upgrades. The solution must ensure that only 10 percent of users who connect to az400-9940427-main use update versions of the app.
The solution must minimize administrative effort.
To complete this task, sign in to the Microsoft Azure portal.
You need to create a notification if the peak averageresponse time of an Azure web app named az400-9940427-main is more than five seconds when evaluated during a five-minute period. The notification must trigger the “https://contoso.com/notify” webhook.
To complete this task, sign in to the Microsoft Azureportal.
Task 12
You need to create a personal access token (PAT) named Token! that has only the following capabilities
• Read write, andmanage code
• Read and execute builds
• Read releases
Token1 must expire in 60 days.
You have an app named App1 that will be deployed by using Azure Container Apps. You need to ensure that App1 can be deployed by using the blue-green deployment strategy. Which two actions should you perform in Container Apps? Each correct answer presents part of the solution. NOTE; Each correct selection is worth one point.
You have an X.509 certificate named cert1 that is managed by an external partner named Partner 1. You build a web app named Web1 that will be deployed by using Azure Pipelines. Web1 will be bound to cert1. You need to ensure that cert1 is available to Azure Pipelines. The solution must ensure that cert1 can only be updated by Partner1. Where should you store cert1?
Task 5
You plan to stoic signed images in an Azure Container Registry instance named az40038443478act1.
You need to modify the SKU for az40038443478aa1 to support the planned images. The solution must minimize costs.
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 a project that includes a .NET app and a database backend.
You have a pipeline that includes the following YAML code.

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

You have an Azure DevOps project named Project1 that uses an Azure Pipelines pipeline to build, test, and deploy an app named Appl.
You have a credential named credl.
You need to ensure that credl can be used to deploy builds of Appl to production The solution must ensure that credl is available for use only by specific users and pipelines in Project 1.
What should you do?
Note: This section contains one or more sets of questions with the same scenario and problem. Each question presents a unique solution to the problem. You must determine whether the solution meets the stated goals. More than one solution in the set might solve the problem. It is also possible that none of the solutions in the set solve the problem.
After you answer a question in this section, you will NOT be able to return. As a result, these questions do not appear on the Review Screen.
You have an on-premises web server named Server1.
You need to ensure that you can build .NET apps and deploy the apps to Server1 by using Azure Pipelines.
Solution: You deploy a virtual machine scale set and select a custom Ubuntu image that includes the .NET command-line interface (CU) tools.
Does this meet the goal?
You have multiple automated workflows that interact with Azure DevOps and use the following services:
• Azure Command-Line Interface (CLI)
• Azure PowerShell
• Azure Functions
You need to recommend which authentication method to use for each service. The solution must minimize the risk of compromising credentials.
What should you recommend for each service? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You have a GitHub Enterprise organization that contains three GitHub repositories.
You need to store a secret named Secret 1. The solution must meet the following requirements:
• GitHub Actions must be able to use Secret1 in each repository.
• Administrative effort must be minimized.
As what should you store Secret1?
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 add the virtual machines as managed nodes in Azure Automation State Configuration.
You need to configure the computer in Group7.
What should you do?
You need to create and configure an Azure Storage account named az400lod11566895stor in a resource group named RG1lod11566895 to store the boot diagnostics for a virtual machine named VM1.
To complete this task, sign in to the Microsoft Azure portal.
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 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.

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.

In Azure DevOps, you create Project3.
You need to meet the requirements of the project.
What should you do first?
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 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 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.

Your company has an on-premises Bitbucket Server that is used for Git-based source control. The server is protected by a firewall that blocks inbound Internet traffic.
You plan to use Azure DevOps to manage the build and release processes
Which two components are required to integrate Azure DevOps and Bitbucket?
Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one port.
Your company plans to implement a new compliance strategy that will require all Azure web apps to be backed up every five hours.
You need to back up an Azure web app named az400-11566895-main every five hours to an Azure Storage account in your resource group.
To complete this task, sign in to the Microsoft Azure portal.
You create an alert rule in Azure Monitor as shown in the following exhibit.

Which action will trigger an alert?
Your company uses Service Now for incident management.
You develop an application that runs on Azure.
The company needs to generate a ticket in Service Now when the application fails to authenticate.
Which Azure Log Analytics solution should you use?
You use Azure Pipelines lo manage the build and deployment of apps.
You are planning the release strategies for a new app. You need to choose strategies for the following scenarios:
• Releases will be made available to users who are grouped by their tolerance for software faults.
• Code will be deployed to enable functionality that will be available in later releases of the app.
• When a new release occurs, the existing deployment will remain active to minimize recovery time if a return to the previous version is required.

You are developing an iOS application by using Azure DevOps.
You need to test the application manually on 10 devices without releasing the application to the public.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
You need to deploy Internet Information Services (IIS) to an Azure virtual machine that runs Windows Server 2022
How should you complete the Desired State Configuration (DSC) configuration script? To answer, drag the appropriate values to the correct locations. 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.

You are developing an open source solution that uses a GitHub repository.
You create a new public project in Azure DevOps.
You plan to use Azure Pipelines for continuous build. The solution will use the GitHub Checks API.
Which authentication type should you use?
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.
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 plan to update the Azure DevOps strategy of your company.
You need to identify the following issues as they occur during the company’s development process:
Licensing violations
Prohibited libraries
Solution: You implement pre-deployment gates.
Does this meet the goal?
You have an Azure DevOps organization named Contoso that contains a project named Project 1.
You provision an Azure key vault name Keyvault1.
You need to reference Keyvault1 secrets in a build pipeline of Project1.
What should you do first?
You have web app named App1 that uses Application Insights in Azure Monitor to Store log data. App1 has users in multiple locations.
You need to query App1 requests from London and Paris that return error. The solution must meet the following requirements:
Return the timestamp, url, result Code, and duration fields.
Only requests made the last hour.
How shout you complete the query?

You use Azure Artifacts to host NuGet packages that you create.
You need to make one of the packages available to anonymous users outside your organization. The solution must minimize the number of publication points.
What should you do?
You need to ensure that an Azure web app named az400-9940427-main supports rolling upgrades. The solution must ensure that only 10 percent of users who connect to az400-9940427-main use update versions of the app.
The solution must minimize administrative effort.
To complete this task, sign in to the Microsoft Azure portal.

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.
You have an Azure DevOps organization named Contoso and an Azure subscription.
You use Azure DevOps to build and deploy a web app named App1. Azure Monitor is configured to generate an email notification in response to alerts generated whenever App1 generates a server-side error.
You need to receive notifications in Microsoft Teams whenever an Azure Monitor alert is generated.
Which two actions should you perform? Each correct answer presents part of the solution.
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.
The lead developer at your company reports that adding new application features takes longer than expected due to a large accumulated technical debt.
You need to recommend changes to reduce the accumulated technical debt.
Solution: You recommend reducing the code coupling and the dependency cycles?
Does this meet the goal?
You have an Azure DevOps project named Project1 and an Azure subscription named Sub1. Sub1 contains an Azure SQL database named DB1.
You need to create a release pipeline that uses the Azure SQL Database Deployment task to update DB1.
Which artifact should you deploy?
You have an Azure pipeline that is used to deploy an app named App1.
You need to ensure that new versions of App1 are released only if they exceed performance baselines. The solution must minimize administrative effort.
What should you configure?
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 plan to update the Azure DevOps strategy of your company.
You need to identify the following issues as they occur during the company’s development process:
Licensing violations
Prohibited libraries
Solution: You implement continuous integration.
Does this meet the goal?
You deploy multiple apps by using Azure Pipelines.
You need to recommend a solution to manage the configuration of the apps. The solution must meet the following requirements:
• Support sharing a set of feature flags across multipleapps.
• Support deploying configurations to different deployment slots.
What should you use for each requirement? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

You have an Azure subscription that contains an Azure pipeline named Pipeline1 and a GitHub repository named Repo1, Repo1 contains Bicep modules. Pipeline1 deploys Azure resources by using the Bicep modules.
You need to ensure that all releases comply with Azure Policy before they are deployed to production.
What should you do?
You have a project in Azure DevOps.
You need to configure a dashboard that will provide information on the following metrics.
• How long it takes to close a work item
• The number of completed backlog items
• How long it takes to restore failed services
Which type of widget should you use for each metric? To answer, drag the appropriate widget types to the correct metrics. Each widget type 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 multi-tier application. The front end of the application is hosted in Azure App Service.
You need to identify the average load times of the application pages.
What should you use?
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.
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 Batch changes while a build is in progress .
Does this meet the goal?
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 isassigned 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?
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 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 need to meet the technical requirements for monitoring App1.
What should you use?
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 the merge the POC branch into the main branch. The solution must meet the technical requirements.
Which command should you run?
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 !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 meet the technical requirements for controlling access to Azure DevOps.
What should you use?
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 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.

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.

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.

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.

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.

What should you use to implement the code quality restriction on the release pipeline for the investment planning applications suite?
Which branching strategy should you recommend for the investment planning applications suite?
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 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?
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.

To resolve the current technical issue, what should you do to the Register-AzureRmAutomationDscNode command?
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.

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.

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?


































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













Graphical user interface, text, application
Description automatically generated




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
















