Microsoft AZ-204 Practice Exams
Last updated on Oct 22,2026- Exam Code: AZ-204
- Exam Name: Developing Solutions for Microsoft Azure
- Certification Provider: Microsoft
- Latest update: Oct 22,2026
Topic 1, Windows Server 2016 virtual machine
Case study
This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.
To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.
At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.
To start the case study
To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question.
Current environment
Windows Server 2016 virtual machine
This virtual machine (VM) runs BizTalk Server 2016. The VM runs the following workflows:
– Ocean Transport C This workflow gathers and validates container information including container contents and arrival notices at various shipping ports.
– Inland Transport C This workflow gathers and validates trucking information including fuel usage, number of stops, and routes.
The VM supports the following REST API calls:
– Container API C This API provides container information including weight, contents, and other attributes.
– Location API C This API provides location information regarding shipping ports of call and trucking stops.
– Shipping REST API C This API provides shipping information for use and display on the shipping website.
Shipping Data
The application uses MongoDB JSON document storage database for all container and transport information.
Shipping Web Site
The site displays shipping container tracking information and container contents. The site is located at http://shipping.wideworldimporters.com/
Proposed solution
The on-premises shipping application must be moved to Azure. The VM has been migrated to a new Standard_D16s_v3 Azure VM by using Azure Site Recovery and must remain running in Azure to complete the BizTalk component migrations. You create a Standard_D16s_v3 Azure VM to host BizTalk Server.
The Azure architecture diagram for the proposed solution is shown below:

Requirements
Shipping Logic app
The Shipping Logic app must meet the following requirements:
– Support the ocean transport and inland transport workflows by using a Logic App.
– Support industry-standard protocol X12 message format for various messages including vessel content details and arrival notices.
– Secure resources to the corporate VNet and use dedicated storage resources with a fixed costing model.
– Maintain on-premises connectivity to support legacy applications and final BizTalk migrations.
Shipping Function app
Implement secure function endpoints by using app-level security and include Azure Active Directory (Azure AD).
REST APIs
The REST API’s that support the solution must meet the following requirements:
– Secure resources to the corporate VNet.
– Allow deployment to a testing location within Azure while not incurring additional costs.
– Automatically scale to double capacity during peak shipping times while not causing application downtime.
– Minimize costs when selecting an Azure payment model.
Shipping data
Data migration from on-premises to Azure must minimize costs and downtime.
Shipping website
Use Azure Content Delivery Network (CDN) and ensure maximum performance for dynamic content while minimizing latency and costs.
Issues
Windows Server 2016 VM
The VM shows high network latency, jitter, and high CPU utilization. The VM is critical and has not been backed up in the past. The VM must enable a quick restore from a 7-day snapshot to include in-place restore of disks in case of failure.
Shipping website and REST APIs
The following error message displays while you are testing the website:
Failed to load http://test-shippingapi.wideworldimporters.com/: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://test.wideworldimporters.com/’ is therefore not allowed access.
HOTSPOT
You need to configure Azure CDN for the Shipping web site.
Which configuration options should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

A company is implementing a publish-subscribe (Pub/Sub) messaging component by using Azure Service Bus. You are developing the first subscription application.
In the Azure portal you see that messages are being sent to the subscription for each topic. You create and initialize a subscription client object by supplying the correct details, but the subscription application is still not consuming the messages.
You need to ensure that the subscription client processes all messages.
Which code segment should you use?
- A . await subscriptionClient.AddRuleAsync(new RuleDescription (RuleDescription.DefaultRuleName, new TrueFilter()));
- B . subscriptionClient = new SubscriptionClient(ServiceBusConnectionString,
TopicName, SubscriptionName); - C . await subscriptionClient.CloseAsync();
- D . subscriptionClient.RegisterMessageHandler(ProcessMessagesAsync,
messageHandlerOptions);
HOTSPOT
You need to correct the VM issues.
Which tools should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

HOTSPOT
You are building a website to access project data related to terms within your organization. The website does not allow anonymous access. Authentication performed using an Azure Active Directory (Azure AD) app named internal.
The website has the following authentication requirements:
• Azure AD users must be able to login to the website.
• Personalization of the website must be based on membership in Active Directory groups.
You need to configure the application’s manifest to meet the authentication requirements.
How should you configure the manifest? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

HOTSPOT
You are building a website to access project data related to terms within your organization. The website does not allow anonymous access. Authentication performed using an Azure Active Directory (Azure AD) app named internal.
The website has the following authentication requirements:
• Azure AD users must be able to login to the website.
• Personalization of the website must be based on membership in Active Directory groups.
You need to configure the application’s manifest to meet the authentication requirements.
How should you configure the manifest? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

A company maintains multiple web and mobile applications. Each application uses custom in-house identity providers as well as social identity providers.
You need to implement single sign-on (SSO) for all the applications.
What should you do?
- A . Use Azure Active Directory B2C (Azure AD B2C) with custom policies. Most Voted
- B . Use Azure Active Directory B2B (Azure AD B2B) and enable external collaboration.
- C . Use Azure Active Directory B2C (Azure AD B2C) with user flows.
- D . Use Azure Active Directory B2B (Azure AD B2B).
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 on the review screen.
You are implementing an application by using Azure Event Grid to push near-real-time information to customers.
You have the following requirements:
• You must send events to thousands of customers that include hundreds of various event types.
• The events must be filtered by event type before processing.
• Authentication and authorization must be handled by using Microsoft Entra ID.
• The events must be published to a single endpoint.
You need to implement Azure Event Grid.
Solution: Publish events to a partner topic. Create an event subscription for each customer.
Does the solution meet the goal?
- A . Yes
- B . No
HOTSPOT
You provisioned an Azure Cosmos DB for NoSQL account named account1 with the default consistency level.
You plan to configure the consistency level on a per request basis The level needs to be set for consistent prefix for read and write operations to account1.
You need to identify the resulting consistency level for read and write operations.
Which levels should you configure? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

HOTSPOT
You provisioned an Azure Cosmos DB for NoSQL account named account1 with the default consistency level.
You plan to configure the consistency level on a per request basis The level needs to be set for consistent prefix for read and write operations to account1.
You need to identify the resulting consistency level for read and write operations.
Which levels should you configure? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

You are preparing to deploy an ASP.NET Core website to an Azure Web App from a GitHub repository.
The website includes static content generated by a script.
You plan to use the Azure Web App continuous deployment feature.
You need to run the static generation script before the website starts serving traffic.
What are two possible ways to achieve this goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
- A . Create a file named .deployment in the root of the repository that calls a script which generates the static content and deploys the website.
- B . Add a PreBuild target in the websites csproj project file that runs the static content generation script.
- C . Create a file named run.cmd in the folder /run that calls a script which generates the static content and deploys the website.
- D . Add the path to the static content generation tool to WEBSITE_RUN_FROM_PACKAGE setting in the host.json file.