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 develop an app that allows users to upload photos and videos to Azure storage. The app uses a storage REST API call to upload the media to a blob storage account named Account1. You have blob storage containers named Container1 and Container2.
Uploading of videos occurs on an irregular basis.
You need to copy specific blobs from Container1 to Container2 when a new video is uploaded.
What should you do?
- A . Copy blobs to Container2 by using the Put Blob operation of the Blob Service REST API
- B . Create an Event Grid topic that uses the Start-AzureStorageBlobCopy cmdlet
- C . Use AzCopy with the Snapshot switch to copy blobs to Container2
- D . Download the blob to a virtual machine and then upload the blob to Container2
B
Explanation:
The Start-AzureStorageBlobCopy cmdlet starts to copy a blob.
Example 1: Copy a named blob
C:PS>Start-AzureStorageBlobCopy -SrcBlob "ContosoPlanning2015" -DestContainer "ContosoArchives" -SrcContainer "ContosoUploads"
This command starts the copy operation of the blob named ContosoPlanning2015 from the container named ContosoUploads to the container named ContosoArchives.
Reference: https://docs.microsoft.com/en-us/powershell/module/azure.storage/start-azurestorageblobcopy?view=azurermps-6.13.0
DRAG DROP
You are creating a script that will run a large workload on an Azure Batch pool. Resources will be reused and do not need to be cleaned up after use.
You have the following parameters:

You need to write an Azure CLI script that will create the jobs, tasks, and the pool.
In which order should you arrange the commands to develop the solution? To answer, move the appropriate commands from the list of command segments to the answer area and arrange them in the correct order.

Explanation:
Step 1: az batch pool create
# Create a new Linux pool with a virtual machine configuration. az batch pool create
–id mypool
–vm-size Standard_A1 –target-dedicated 2
–image canonical:ubuntuserver:16.04-LTS
–node-agent-sku-id "batch.node.ubuntu 16.04"
Step 2: az batch job create
# Create a new job to encapsulate the tasks that are added. az batch job create
–id myjob
–pool-id mypool
Step 3: az batch task create
# Add tasks to the job. Here the task is a basic shell command. az batch task create
–job-id myjob –task-id task1
–command-line "/bin/bash -c ‘printenv AZ_BATCH_TASK_WORKING_DIR’"
Step 4: for i in {1..$numberOfJobs} do
Reference: https://docs.microsoft.com/bs-latn-ba/azure/batch/scripts/batch-cli-sample-run-job
You develop and deploy an Azure Logic app that calls an Azure Function app. The Azure Function app includes an OpenAPl (Swagger) definition and uses an Azure Blob storage account. All resources are secured by using Azure Active Directory (Azure AD).
The Azure Logic app must securely access the Azure Blob storage account. Azure AD resources must remain if the Azure Logic app is deleted.
You need to secure the Azure Logic app.
What should you do?
- A . Create an Azure AD custom role and assign role-based access controls.
- B . Create an Azure AD custom role and assign the role to the Azure Blob storage account.
- C . Create an Azure Key Vault and issue a client certificate.
- D . Create a user-assigned managed identity and assign role-based access controls.
- E . Create a system-assigned managed identity and issue a client certificate.
D
Explanation:
To give a managed identity access to an Azure resource, you need to add a role to the target resource for that identity.
Note: To easily authenticate access to other resources that are protected by Azure Active Directory (Azure AD) without having to sign in and provide credentials or secrets, your logic app can use a managed identity (formerly known as Managed Service Identity or MSI). Azure manages this identity for you and helps secure your credentials because you don’t have to provide or rotate secrets.
If you set up your logic app to use the system-assigned identity or a manually created, user-assigned identity, the function in your logic app can also use that same identity for authentication.
Reference:
https://docs.microsoft.com/en-us/azure/logic-apps/create-managed-service-identity
https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-mutual-certificates-for-clients
You develop a solution that uses an Azure SQL Database to store user information for a mobile app.
The app stores sensitive information about users.
You need to hide sensitive information from developers that query the data for the mobile app.
Which three items must you identify when configuring dynamic data masking? Each correct answer presents a part of the solution. NOTE: Each correct selection is worth one point.
- A . Column
- B . Table
- C . Trigger
- D . Index
- E . Schema
ABE
Explanation:
In the Dynamic Data Masking configuration page, you may see some database columns that the recommendations engine has flagged for masking. In order to accept the recommendations, just click Add Mask for one or more columns and a mask is created based on the default type for this column. You can change the masking function by clicking on the masking rule and editing the masking field format to a different format of your choice.

Reference: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-dynamic-data-masking-get-started-portal
You need to access data from the user claim object in the e-commerce web app.
What should you do first?
- A . Write custom code to make a Microsoft Graph API call from the e-commerce web app.
- B . Assign the Contributor RBAC role to the e-commerce web app by using the Resource Manager create role assignment API.
- C . Update the e-commerce web app to read the HTTP request header values.
- D . Using the Azure CLI, enable Cross-origin resource sharing (CORS) from the e-commerce checkout API to the e-commerce web app.
C
Explanation:
Methods to Get User Identity and Claims in a .NET Azure Functions App include:
ClaimsPrincipal from the Request Context
The ClaimsPrincipal object is also available as part of the request context and can be extracted from the HttpRequest.HttpContext.
User Claims from the Request Headers.
App Service passes user claims to the app by using special request headers.
Reference: https://levelup.gitconnected.com/four-alternative-methods-to-get-user-identity-and-claims-in-a-net-azurefunctions-app-df98c40424bb
HOTSPOT
You are developing a back-end Azure App Service that scales based on the number of messages contained in a Service Bus queue.
A rule already exists to scale up the App Service when the average queue length of unprocessed and valid queue messages is greater than 1000.
You need to add a new rule that will continuously scale down the App Service as long as the scale up condition is not met.
How should you configure the Scale rule? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.


Explanation:
Box 1: Service bus queue
You are developing a back-end Azure App Service that scales based on the number of messages contained in a Service Bus queue.
Box 2: ActiveMessage Count
ActiveMessageCount: Messages in the queue or subscription that are in the active state and ready for delivery.
Box 3: Count
Box 4: Less than or equal to
You need to add a new rule that will continuously scale down the App Service as long as the scale up condition is not met.
Box 5: Decrease count by
You need to secure the corporate website to meet the security requirements.
What should you do?
- A . Create an App Service instance with a standard plan. Configure the custom domain with a TLS/SSL certificate.
- B . Create an Azure Application Gateway with a Web Application Firewall (WAF). Configure end-to-end TLS encryption and the WAF.
- C . Create an Azure Cache for Radis instance. Update the code to support the cache.
- D . Create an Azure Content Delivery Network profile and endpoint. Configure the endpoint.
HOTSPOT
You need to implement event routing for retail store location data.
Which configuration should you use?


HOTSPOT
You have a web service that is used to pay for food deliveries. The web service uses Azure Cosmos DB as the data store.
You plan to add a new feature that allows users to set a tip amount. The new feature requires that a property named tip on the document in Cosmos DB must be present and contain a numeric value.
There are many existing websites and mobile apps that use the web service that will not be updated to set the tip property for some time.
How should you complete the trigger? NOTE: Each correct selection is worth one point.

Explanation:
Box 1: getContext().getRequest();
Box 2: if(isNaN(i)["tip"] ..
In JavaScript, there are two ways to check if a variable is a number :
isNaN() C Stands for “is Not a Number”, if variable is not a number, it return true, else return false.
typeof C If variable is a number, it will returns a string named “number”.
Box 3:r.setBody(i);
// update the item that will be created
Reference:
https://docs.microsoft.com/bs-latn-ba/azure/cosmos-db/how-to-write-stored-procedures-triggers-udfs
https://mkyong.com/javascript/check-if-variable-is-a-number-in-javascript/
You have an Azure API Management (APIM) Standard tier instance named APIM1 that uses a managed gateway.
You plan to use APIM1 to publish an API named API1 that uses a backend database that supports only a limited volume of requests per minute. You also need a policy for AP11 that will minimize the possibility that the number of requests to the backend database from an individual IP address you specify exceeds the supported limit.
You need to identify a policy for API1 that will meet the requirements.
Which policy should you use?
- A . quota-by-key
- B . rate-limit
- C . ip-fitter
- D . rate-limit-by-key