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 have an Azure Cosmos 06 instance that uses the Strong consistency level and 10,000 Request Units (RUs) per container. <3eo-replication is enabled.
The instance stores restaurant information including location, menu items, and start. You currently store information for 1,000 restaurant locations, 500 menu items, and 10,000 staff members. You select the location id as the partition key.
How many logical partitions will be created for the container?
- A . 500
- B . 1,100
- C . 10.000
- D . 10,000,000
HOTSPOT
You have the following data lifecycle management policy:

You plan to implement an Azure Blob Storage account and apply to it Policy 1. The solution should maximize resiliency and performance.
You need to configure the account to support the policy.
Which redundancy option and storage account type should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.


HOTSPOT
You are developing a solution that uses several Azure Service Bus queues. You create an Azure Event Grid subscription for the Azure Service Bus namespace. You use Azure Functions as subscribers to process the messages.
You need to emit events to Azure Event Grid from the queues. You must use principal of least privilege and minimize costs.
Which Azure Service Bus values should you use? TO answer, select the appropriate options in the answer area. Each correct selection is worth ore point


DRAG DROP
You are developing an Azure solution.
You need to develop code to access a secret stored in Azure Key Vault.
How should you complete the code segment? To answer, drag the appropriate code segments to the correct locations. Each code 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: SecretClient
Box 2: DefaultAzureCredential
In below example, the name of your key vault is expanded to the key vault URI, in the format "https://<your-key-vault-name>.vault.azure.net". This example is using ‘DefaultAzureCredential()’ class from Azure Identity Library, which allows to use the same code across different environments with different options to provide identity.
string keyVaultName = Environment.GetEnvironmentVariable("KEY_VAULT_NAME"); var kvUri = "https://" + keyVaultName + ".vault.azure.net";
var client = new SecretClient(new Uri(kvUri), new DefaultAzureCredential());
Reference: https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-net
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 Windows VM that is triggered from Azure Service Bus Queue.
Does the solution meet the goal?
- A . Yes
- B . No
B
Explanation:
Don’t use a VM, instead 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
HOTSPOT
An organization deploys a blob storage account. Users take multiple snapshots of the blob storage account over time. You need to delete all snapshots of the blob storage account. You must not delete the blob storage account itself.
How should you complete the code segment? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.


You are developing a medical records document management website. The website is used to store scanned copies of patient intake forms. If the stored intake forms are downloaded from storage by a third party, the content of the forms must not be compromised.
You need to store the intake forms according to the requirements.
Solution:
✑ Create an Azure Cosmos DB database with Storage Service Encryption enabled.
✑ Store the intake forms in the Azure Cosmos DB database.
Does the solution meet the goal?
- A . Yes
- B . No
B
Explanation:
Instead use an Azure Key vault and public key encryption. Store the encrypted from in Azure Storage Blob storage.
You are developing a medical records document management website. The website is used to store scanned copies of patient intake forms. If the stored intake forms are downloaded from storage by a third party, the content of the forms must not be compromised.
You need to store the intake forms according to the requirements.
Solution:
✑ Create an Azure Cosmos DB database with Storage Service Encryption enabled.
✑ Store the intake forms in the Azure Cosmos DB database.
Does the solution meet the goal?
- A . Yes
- B . No
B
Explanation:
Instead use an Azure Key vault and public key encryption. Store the encrypted from in Azure Storage Blob storage.
HOTSPOT
You plan to deploy a web app to App Service on Linux. You create an App Service plan. You create and push a custom Docker image that image that contains the web app to Azure Container Registry.
You need to access the console logs generated from inside the container in real-time.
How should you complete the Azure CLI command? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Explanation:
Box 1: config
To Configure logging for a web app use the command:
az webapp log config
Box 2: –docker-container-logging
Syntax include:
az webapp log config [–docker-container-logging {filesystem, off}]
Box 3: webapp
To download a web app’s log history as a zip file use the command:
az webapp log download
Box 4: download
Reference: https://docs.microsoft.com/en-us/cli/azure/webapp/log
You are developing applications for a company. You plan to host the applications on Azure App Services.
The company has the following requirements:
✑ Every five minutes verify that the websites are responsive.
✑ Verify that the websites respond within a specified time threshold.
Dependent requests such as images and JavaScript files must load properly.
✑ Generate alerts if a website is experiencing issues.
✑ If a website fails to load, the system must attempt to reload the site three more times.
You need to implement this process with the least amount of effort.
What should you do?
- A . Create a Selenium web test and configure it to run from your workstation as a scheduled task.
- B . Set up a URL ping test to query the home page.
- C . Create an Azure function to query the home page.
- D . Create a multi-step web test to query the home page.
- E . Create a Custom Track Availability Test to query the home page.
D
Explanation:
You can monitor a recorded sequence of URLs and interactions with a website via multi-step web tests.
Reference: https://docs.microsoft.com/en-us/azure/azure-monitor/app/availability-multistep