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
You need to implement an aggregate of telemetry values for distributor API calls.
Which Application Insights API method should you use?
- A . TrackTrace
- B . Track Exception
- C . TrackEvent
- D . TrackDependency
- E . TrackMetric
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 Storage Queue from the mobile application.
Create an Azure Function App that uses an Azure Storage Queue trigger.
Does the solution meet the goal?
- A . Yes
- B . No
B
Explanation:
Create an Azure Function App that uses an Azure Service Bus Queue trigger.
Reference: https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-storage-queue-triggered-function
You are developing a mobile instant messaging app for a company.
The mobile app must meet the following requirements:
• Support offline data sync.
• Update the latest messages during normal sync cycles.
You need to implement Offline Data Sync.
Which two actions should you perform? Each conn I answer presents part of the solution. NOTE: Each correct selection is worth one point.
- A . Retrieve records from Offline Data Sync on every call to the PullAsync method.
- B . Retrieve records from Offline Data Sync using an Incremental Sync.
- C . Push records to Offline Data Sync using an Incremental Sync.
- D . Return the updatedAt column from the Mobile Service Backend and implement sorting by using the column.
- E . Return the updatedAt column from the Mobile Service Backend and implement sorting by the message id.
B, E
Explanation:
B: Incremental Sync: the first parameter to the pull operation is a query name that is used only on the client. If you use a non-null query name, the Azure Mobile SDK performs an incremental sync. Each time a pull operation returns a set of results, the latest updatedAt timestamp from that result set is stored in the SDK local system tables. Subsequent pull operations retrieve only records after that timestamp.
E (not D): To use incremental sync, your server must return meaningful updatedAt values and must also support sorting by this field. However, since the SDK adds its own sort on the updatedAt field, you cannot use a pull query that has its own orderBy clause.
Reference: https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-offline-data-sync
You have an Azure App Services Web App. Azure SQL Database instance. Azure Storage Account and an Azure Redis Cache instance in a resource group.
A developer must be able to publish code to the web app. You must grant the developer the Contribute role to the web app
You need to grant the role.
What two commands can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
- A . New-AzureRmRoleAssignment
- B . az role assignment create
- C . az role definition create
- D . New-AzureRmRoleDefinition
AB
Explanation:
Reference:
https://docs.microsoft.com/en-us/cli/azure/role/assignment?view=azure-cli-latest#az-role-assignment-create
https://docs.microsoft.com/en-us/powershell/module/azurerm.resources/new-azurermroleassignment?view=azurermps-6.13.0
HOTSPOT
You are developing an app that manages users for a video game. You plan to store the region, email address, and phone number for the player. Some players may not have a phone number. The player’s region will be used to load-balance data.
Data for the app must be stored in Azure Table Storage.
You need to develop code to retrieve data for an individual player.
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: region
The player’s region will be used to load-balance data.
Choosing the PartitionKey.
The core of any table’s design is based on its scalability, the queries used to access it, and storage operation requirements. The PartitionKey values you choose will dictate how a table will be partitioned and the type of queries that can be used. Storage operations, in particular inserts, can also affect your choice of PartitionKey values.
Box 2: email
Not phone number some players may not have a phone number.
Box 3: CloudTable
Box 4 : TableOperation query =..
Box 5: TableResult
Reference: https://docs.microsoft.com/en-us/rest/api/storageservices/designing-a-scalable-partitioning-strategy-for-azure-table-storage
HOTSPOT
You need to configure the integration for Azure Service Bus and Azure Event Grid.
How should you complete the CLI statement? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Box 1: eventgrid
To create event subscription use: az eventgrid event-subscription create
Box 2: event-subscription
Box 3: servicebusqueue
Scenario: Azure Service Bus and Azure Event Grid
Azure Event Grid must use Azure Service Bus for queue-based load leveling.
Events in Azure Event Grid must be routed directly to Service Bus queues for use in buffering.
Events from Azure Service Bus and other Azure services must continue to be routed to Azure Event Grid for processing.
Reference: https://docs.microsoft.com/en-us/cli/azure/eventgrid/event-subscription?view=azure-cli-latest#az_eventgrid_event_subscription_create
HOTSPOT
You have an Azure API Management instance named API! that uses a managed gateway.
You plan to implement a policy that will apply at a product scope and will set the header of inbound requests to include information about the region hosting the gateway of API1. The policy definition contains the following content.

You have the following requirements for the policy definition:
• Ensure that the header contains the information about the region hosting the gateway of API1.
• Ensure the policy applies only after any global level policies are processed first.
You need to complete the policy definition.
Which values should you choose? To answer, select the appropriate options in the answer area.


You use Azure Table storage to store customer information for an application. The data contains customer details and is partitioned by last name. You need to create a query that returns all customers with the last name Smith.
Which code segment should you use?
- A . TableQuery.GenerateFilterCondition("PartitionKey", Equals, "Smith")
- B . TableQuery.GenerateFilterCondition("LastName", Equals, "Smith")
- C . TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "Smith")
- D . TableQuery.GenerateFilterCondition("LastName", QueryComparisons.Equal, "Smith")
C
Explanation:
Retrieve all entities in a partition. The following code example specifies a filter for entities where ‘Smith’ is the partition key. This example prints the fields of each entity in the query results to the
console.
Construct the query operation for all customer entities where PartitionKey="Smith".
TableQuery<CustomerEntity> query = new
TableQuery<CustomerEntity>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "Smith"));
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/table-storage-how-to-use-dotnet
HOTSPOT
You are developing an application to store and retrieve data in Azure Blob storage. The application will be hosted in an on-premises virtual machine (VM). The VM is connected to Azure by using a Site-to-Site VPN gateway connection. The application is secured by using Azure Active Directory (Azure AD) credentials.
The application must be granted access to the Azure Blob storage account with a start time, expiry time, and read permissions. The Azure Blob storage account access must use the Azure AD credentials of the application to secure data access. Data access must be able to be revoked if the client application security is breached.
You need to secure the application access to Azure Blob storage.
Which security features should you use? To answer select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Box 1: Shared access signature (SAS) token
When your application design requires shared access signatures for access to Blob storage, use Azure AD credentials to create a user delegation SAS when possible for superior security.
Box 2: Stored access policy
Stored access policies give you the option to revoke permissions for a service SAS without having to regenerate the storage account keys.
A shared access signature can take one of the following two forms:
Service SAS with stored access policy. A stored access policy is defined on a resource container, which can be a blob container, table, queue, or file share. The stored access policy can be used to manage constraints for one or more service shared access signatures. When you associate a service SAS with a stored access policy, the SAS inherits the constraints C the start time, expiry time, and permissions
C defined for the stored access policy. Ad hoc SAS.
Reference: https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
DRAG DROP
You have an application that provides weather forecasting data to external partners. You use Azure API Management to publish APIs.
You must change the behavior of the API to meet the following requirements:
• Support alternative input parameters.
• Remove formatting text from responses.
• Provide additional context to back-end services.
Which types of policies should you implement? To answer, drag the policy types to the correct scenarios. Each policy 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.

