Microsoft AZ-204 Practice Exams
Last updated on Nov 16,2026- Exam Code: AZ-204
- Exam Name: Developing Solutions for Microsoft Azure
- Certification Provider: Microsoft
- Latest update: Nov 16,2026
DRAG DROP
You are developing a new page for a website that uses Azure Cosmos DB for data storage.
The feature uses documents that have the following format:

You must display data for the new page in a specific order. You create the following query for the page:

You need to configure a Cosmos DB policy to the support the query.
How should you configure the policy? To answer, drag the appropriate JSON segments to the correct locations. Each JSON segment 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:
Box 1: compositeIndexes
You can order by multiple properties. A query that orders by multiple properties requires a composite index.
Box 2: descending
Example: Composite index defined for (name ASC, age ASC):
It is optional to specify the order. If not specified, the order is ascending.
{
"automatic":true,
"indexingMode":"Consistent",
"includedPaths":[
{
"path":"/*"
}
],
"excludedPaths":[],
"compositeIndexes":[
[
{
"path":"/name",
},
{
"path":"/age",
}
]
]
}
You are developing several Azure API Management (APIM) hosted APIs.
The APIs have the following requirements:
Require a subscription key to access all APIs.
• Include terms of use that subscribers must accept to use the APIs.
• Administrators must review and accept or reject subscription attempts.
• Limit the count of multiple simultaneous subscriptions.
You need to implement the APIs.
What should you do?
- A . Create and publish a product.
- B . Configure and apply query string-based versioning.
- C . Configure and apply header-based versioning.
- D . Add a new revision to all APIs. Make the revisions current and add a change log entry.
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).
A
Explanation:
https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-reference-sso
You are developing a user portal for a company.
You need to create a report for the portal that lists information about employees who are subject matter experts for a specific topic. You must ensure that administrators have full control and cosent over the data.
Which technology should you use?
- A . Microsoft Graph connectors
- B . Microosft graph API
- C . Microsoft Graph data connect
HOTSPOT
You need to insert code at line LE03 of LoginEvent.cs to ensure that all authentication events are processed correctly.
How should you complete the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Box 1: id
id is a unique identifier for the event.
Box 2: eventType
eventType is one of the registered event types for this event source.
Box 3: dataVersion
dataVersion is the schema version of the data object. The publisher defines the schema version.
Scenario: Authentication events are used to monitor users signing in and signing out. All authentication events must be processed by Policy service. Sign outs must be processed as quickly as possible.
The following example shows the properties that are used by all event publishers:
[
{
"topic": string,
"subject": string,
"id": string,
"eventType": string,
"eventTime": string,
"data":{
object-unique-to-each-publisher
},
"dataVersion": string,
"metadataVersion": string
}
]
Reference: https://docs.microsoft.com/en-us/azure/event-grid/event-schema
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 are developing an Azure Service application that processes queue data when it receives a message from a mobile application. Messages may not be sent to the service consistently.
You have the following requirements:
✑ Queue size must not grow larger than 80 gigabytes (GB).
✑ Use first-in-first-out (FIFO) ordering of messages.
✑ Minimize Azure costs.
You need to implement the messaging solution.
Solution: Use the .Net API to add a message to an Azure Service Bus Queue from the mobile application. Create an Azure Function App that uses an Azure Service Bus Queue trigger.
Does the solution meet the goal?
- A . Yes
- B . No
A
Explanation:
You can create a function that is triggered when messages are submitted to an Azure Storage queue.
Reference: https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-storage-queue-triggered-function
You need to secure the Azure Functions to meet the security requirements.
Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
- A . Store the RSA-HSM key in Azure Key Vault with soft-delete and purge-protection features enabled
- B . Store the RSA-HSM key in Azure Blob storage with an immutability policy applied to the container.
- C . Store the RSA-HSM key in Azure Cosmos DB. Apply the built-in policies for customer-managed Keys and allowed locations
- D . Create a standard tier Azure App Configuration instance with an assigned Azure AD managed identity.
- E . Create a free tier Azure App Configuration instance with a new Azure AD service principal.
You need to secure the Azure Functions to meet the security requirements.
Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
- A . Store the RSA-HSM key in Azure Cosmos DB. Apery the built-in policies for customer-managed keys and allowed locations.
- B . Create a free tier Azure App Configuration instance with a new Azure AD service principal.
- C . Store the RSA-HSM key in Azure Key Vault with soft-delete and purge-protection features enabled.
- D . Store the RSA-HSM key in Azure Blob storage with an Immutability policy applied to the container.
- E . Create a standard tier Azure App Configuration instance with an assigned Azure AD managed identity.
CE
Explanation:
Scenario: All Azure Functions must centralize management and distribution of configuration data for different environments and geographies, encrypted by using a company-provided RSA-HSM key.
Microsoft Azure Key Vault is a cloud-hosted management service that allows users to encrypt keys and small secrets by using keys that are protected by hardware security modules (HSMs).
You need to create a managed identity for your application.
Reference: https://docs.microsoft.com/en-us/azure/app-service/app-service-key-vault-references
You develop and deploy a Java RESTful API to Azure App Service.
You open a browser and navigate to the URL for the API.
You receive the following error message:

You need to resolve the error.
What should you do?
- A . Bind an SSL certificate
- B . Enable authentication
- C . Enable CORS
- D . Map a custom domain
- E . Add a CDN
C
Explanation:
We need to enable Cross-Origin Resource Sharing (CORS).
Reference: https://medium.com/@xinganwang/a-practical-guide-to-cors-51e8fd329a1f
You develop and deploy a Java RESTful API to Azure App Service.
You open a browser and navigate to the URL for the API.
You receive the following error message:

You need to resolve the error.
What should you do?
- A . Bind an SSL certificate
- B . Enable authentication
- C . Enable CORS
- D . Map a custom domain
- E . Add a CDN
C
Explanation:
We need to enable Cross-Origin Resource Sharing (CORS).
Reference: https://medium.com/@xinganwang/a-practical-guide-to-cors-51e8fd329a1f