Free Practice · No Signup Required
30 Free Azure AZ-204 Practice Questions
Real practice questions for the Azure Azure Developer Associate (AZ-204) exam, with answers and detailed explanations. Updated 2026.
Free questions
30
Passing score
700 out of 1000
Exam time
100 minutes
Question pool
220+ Questions
Below are 30 real practice questions for the Azure Azure Developer Associate (AZ-204) exam. Each question shows the correct answer and a detailed explanation when you reveal it. Use these to benchmark your readiness — if you score below 70% on these 30 questions, plan for at least 4 more weeks of study before booking.
AZ-204 Practice Questions
Question 1.You are implementing a software as a service (SaaS) ASP.NET Core web service that will run as an Azure Web App. The web service will use an on-premises SQL Server database for storage. The web service also includes a WebJob that processes data updates. Four customers will use the web service. Each instance of the WebJob processes data for a single customer and must run as a singleton instance. Each deployment must be tested by using deployment slots prior to serving production data. Azure costs must be minimized. Azure resources must be located in an isolated network. You need to configure the App Service plan for the Web App. How should you configure the App Service plan? 
- A.Number of VM instances: 2. Pricing tier: Isolated.
- B.Number of VM instances: 8. Pricing tier: Standard.
- C.Number of VM instances: 16. Pricing tier: Premium.
- D.Number of VM instances: 4. Pricing tier: Isolated.(correct answer)
- E.Number of VM instances: 4. Pricing tier: Consumption.
Show answer & explanationHide answer
Correct answer: D
Number of VM instances: 4. Pricing tier: Isolated.
Explanation
Isolated pricing tier is required for network isolation (App Service Environment). Since there are four customers and each WebJob instance must run as a singleton for a single customer, 4 VM instances are needed to ensure each customer's WebJob instance can run independently as a singleton on its own instance if needed, or simply to match the customer count for scaling/isolation requirements mentioned.
Question 2.You are a developer for a software as a service (SaaS) company that uses an Azure Function to process orders. The Azure Function currently runs on an Azure Function app that is triggered by an Azure Storage queue. You are preparing to migrate the Azure Function to Kubernetes using Kubernetes-based Event Driven Autoscaling (KEDA). You need to configure Kubernetes Custom Resource Definitions (CRD) for the Azure Function. Which CRDs should you configure? 
- A.Box 1, CRD type: Deployment. Box 2, CRD type: ScaledObject. Box 3, CRD type: Secret.(correct answer)
- B.Box 1, CRD type: Secret. Box 2, CRD type: ScaledObject. Box 3, CRD type: Secret.
- C.Box 1, CRD type: TriggerAuthentication. Box 2, CRD type: Deployment. Box 3, CRD type: Secret.
- D.Box 1, CRD type: Deployment. Box 2, CRD type: ScaledObject. Box 3, CRD type: TriggerAuthentication.
Show answer & explanationHide answer
Correct answer: A
Box 1, CRD type: Deployment. Box 2, CRD type: ScaledObject. Box 3, CRD type: Secret.
Explanation
To deploy an Azure Function to Kubernetes with KEDA: 1. A Deployment defines the pods. 2. A ScaledObject defines how KEDA should scale the deployment (e.g., based on queue length). 3. A Secret stores the connection strings (like for the Storage queue).
Question 3.You are creating a CLI script that creates an Azure web app and related services in Azure App Service. The web app uses the following variables. You need to automatically deploy code from GitHub to the newly created web app. How should you complete the script?  
- A.Box 1: `az webapp`. Box 2: `az webapp create`. Box 3: `git clone $gitrepo`. Box 4: `az webapp`. Box 5: `--plan $webappname`.
- B.Box 1: `az appservice plan create`. Box 2: `az webapp create`. Box 3: `--plan $webappname`. Box 4: `az webapp deployment`. Box 5: `--repo-url $gitrepo --branch master --manual-integration`.(correct answer)
- C.Box 1: `az appservice plan create`. Box 2: `az webapp deployment`. Box 3: `--plan $webappname`. Box 4: `az webapp deployment`. Box 5: `--repo-url $gitrepo --branch master --manual-integration`.
- D.Box 1: `az group delete`. Box 2: `az webapp create`. Box 3: `git clone $gitrepo`. Box 4: `az appservice plan create`. Box 5: `git clone $gitrepo`.
Show answer & explanationHide answer
Correct answer: B
Box 1: `az appservice plan create`. Box 2: `az webapp create`. Box 3: `--plan $webappname`. Box 4: `az webapp deployment`. Box 5: `--repo-url $gitrepo --branch master --manual-integration`.
Explanation
The standard sequence is to create the App Service plan, then the web app within that plan, and finally configure the deployment source (like GitHub).
Question 4.You develop a software as a service (SaaS) offering to manage photographs. Users upload photos to a web service which then stores the photos in Azure Storage Blob storage. The storage account type is General-purpose V2. When photos are uploaded, they must be processed to produce and save a mobile-friendly version of the image. The process to produce a mobile-friendly version of the image must start in less than one minute. You need to design the process that starts the photo processing. Solution: Trigger the photo processing from Blob storage events. Does the solution meet the goal?
- A.Yes.
- B.No.(correct answer)
Show answer & explanationHide answer
Correct answer: B
No.
Explanation
While Event Grid (Blob Storage events) is very fast, the 'General-purpose V2' account and 'less than one minute' requirement are often part of a specific problem set where the intended answer depends on the exact nuance. In many AZ-204 versions, direct Blob triggers or Event Grid are the right way, but 'No' might be correct here if the question implies a different limitation or if 'Solution: Trigger... from Blob storage events' is considered insufficient without mentioning Event Grid specifically.
Question 5.You develop and deploy an Azure App Service API app to a Windows-hosted deployment slot named `Development`. You create additional deployment slots named `Testing` and `Production`. You enable auto swap on the `Production` deployment slot. You need to ensure that scripts run and resources are available before a swap operation occurs. Solution: Update the `web.config` file to include the `applicationInitialization` configuration element. Specify custom initialization actions to run the scripts. Does the solution meet the goal?
- A.Yes.(correct answer)
- B.No.
Show answer & explanationHide answer
Correct answer: A
Yes.
Explanation
The `applicationInitialization` element in `web.config` is used specifically by IIS (and thus App Service on Windows) to perform warmup tasks, hit specific paths, and ensure the app is ready before it starts receiving production traffic (which happens during a swap).
Question 6.You develop and deploy an Azure App Service API app to a Windows-hosted deployment slot named `Development`. You create additional deployment slots named `Testing` and `Production`. You enable auto swap on the `Production` deployment slot. You need to ensure that scripts run and resources are available before a swap operation occurs. Solution: Enable auto swap for the `Testing` slot. Deploy the app to the `Testing` slot. Does the solution meet the goal?
- A.Yes.
- B.No.(correct answer)
Show answer & explanationHide answer
Correct answer: B
No.
Explanation
Enabling auto swap on the `Testing` slot doesn't ensure that the code is 'warm' or that scripts have run successfully before it moves to the next slot (Production). It just automates the movement.
Question 7.You develop and deploy an Azure App Service API app to a Windows-hosted deployment slot named `Development`. You create additional deployment slots named `Testing` and `Production`. You enable auto swap on the `Production` deployment slot. You need to ensure that scripts run and resources are available before a swap operation occurs. Solution: Disable auto swap. Update the app with a method named `statuscheck` to run the scripts. Re-enable auto swap and deploy the app to the `Production` slot. Does the solution meet the goal?
- A.Yes.
- B.No.(correct answer)
Show answer & explanationHide answer
Correct answer: B
No.
Explanation
Simply adding a method doesn't trigger it during the warmup process. You need to use specific App Service mechanisms like `applicationInitialization` or `WEBSITE_SWAP_WARMUP_PING_PATH` to tell Azure to hit that method.
Question 8.You develop a software as a service (SaaS) offering to manage photographs. Users upload photos to a web service which then stores the photos in Azure Storage Blob storage. The storage account type is General-purpose V2. When photos are uploaded, they must be processed to produce and save a mobile-friendly version of the image. The process to produce a mobile-friendly version of the image must start in less than one minute. You need to design the process that starts the photo processing. Solution: Convert the Azure Storage account to a BlockBlobStorage storage account. Does the solution meet the goal?
- A.Yes.
- B.No.(correct answer)
Show answer & explanationHide answer
Correct answer: B
No.
Explanation
Changing the storage account type to BlockBlobStorage (premium blob) might improve performance, but it doesn't solve the architectural task of *triggering* a process in response to an upload.
Question 9.You are developing an Azure Web App. You configure TLS mutual authentication for the web app. You need to validate the client certificate in the web app. 
- A.Client certificate location: Client cookie. Encoding type: URL.
- B.Client certificate location: HTTP message body. Encoding type: Base64.
- C.Client certificate location: HTTP request header. Encoding type: Unicode.
- D.Client certificate location: HTTP request header. Encoding type: Base64.(correct answer)
Show answer & explanationHide answer
Correct answer: D
Client certificate location: HTTP request header. Encoding type: Base64.
Explanation
When mutual TLS is enabled in App Service, the client certificate is passed to the application in the `X-ARR-ClientCert` HTTP request header, encoded in Base64.
Question 10.You are developing a Docker/Go using Azure App Service Web App for Containers. You plan to run the container in an App Service on Linux. You identify a Docker container image to use. None of your current resource groups reside in a location that supports Linux. You must minimize the number of resource groups required. You need to create the application and perform an initial deployment. Which three Azure CLI commands should you use to develop the solution? 
- A.Box 1: `az webapp create`. Box 2: `az appservice plan create`. Box 3: `az group create`.
- B.Box 1: `az appservice plan create`. Box 2: `az group create`. Box 3: `az group update`.
- C.Box 1: `az group create`. Box 2: `az appservice plan create`. Box 3: `az webapp create`.(correct answer)
Show answer & explanationHide answer
Correct answer: C
Box 1: `az group create`. Box 2: `az appservice plan create`. Box 3: `az webapp create`.
Explanation
The order must be: 1. `az group create` (to create the resource group in a Linux-supporting region). 2. `az appservice plan create` (with `--is-linux`). 3. `az webapp create` (referencing the plan and the Docker image).
Question 11.Fourth Coffee has an ASP.NET Core web app that runs in Docker. The app is mapped to the `www.fourthcoffee.com` domain. Fourth Coffee is migrating this application to Azure. You need to provision an App Service Web App to host this docker image and map the custom domain to the App Service web app. A resource group named `FourthCoffeePublicWebResourceGroup` has been created in the WestUS region that contains an App Service Plan named `AppServiceLinuxDockerPlan`. Which order should the CLI commands be used to develop the solution? 
- A.Box 1: `#/bin/bash appName='FourthCoffeePublicWeb$random' location='WestUS' dockerHubContainerPath='FourthCoffee/publicweb:v1' fqdn='http://www.fourthcoffee.com'>www.fourthcoffee.com`. Box 2: `az webapp create --name $appName --plan AppServiceLinuxDockerPlan --resource-group fourthCoffeePublicWebResourceGroup`. Box 3: `az webapp config container set --docker-custom-image-name $dockerHubContainerPath --name $appName --resource-group fourthCoffeePublicWebResourceGroup`. Box 4: `az webapp config hostname add --webapp-name $appName --resource-group fourthCoffeePublicWebResourceGroup --hostname $fqdn`.(correct answer)
- B.Box 1: `#/bin/bash appName='FourthCoffeePublicWeb$random' location='WestUS' dockerHubContainerPath='FourthCoffee/publicweb:v1' fqdn='http://www.fourthcoffee.com'>www.fourthcoffee.com`. Box 2: `az webapp create --name $appName --plan AppServiceLinuxDockerPlan --resource-group fourthCoffeePublicWebResourceGroup`. Box 3: `az webapp config hostname add --webapp-name $appName --resource-group fourthCoffeePublicWebResourceGroup --hostname $fqdn`. Box 4: `az webapp config container set --docker-custom-image-name $dockerHubContainerPath --name $appName --resource-group fourthCoffeePublicWebResourceGroup`.
- C.Box 1: `az webapp config container set --docker-custom-image-name $dockerHubContainerPath --name $appName --resource-group fourthCoffeePublicWebResourceGroup`. Box 2: `az webapp create --name $appName --plan AppServiceLinuxDockerPlan --resource-group fourthCoffeePublicWebResourceGroup`. Box 3: `az webapp config hostname add --webapp-name $appName --resource-group fourthCoffeePublicWebResourceGroup --hostname $fqdn`. Box 4: `#/bin/bash appName='FourthCoffeePublicWeb$random' location='WestUS' dockerHubContainerPath='FourthCoffee/publicweb:v1' fqdn='http://www.fourthcoffee.com'>www.fourthcoffee.com`.
- D.Box 1: `az webapp config hostname add --webapp-name $appName --resource-group fourthCoffeePublicWebResourceGroup --hostname $fqdn`. Box 2: `az webapp create --name $appName --plan AppServiceLinuxDockerPlan --resource-group fourthCoffeePublicWebResourceGroup`. Box 3: `#/bin/bash appName='FourthCoffeePublicWeb$random' location='WestUS' dockerHubContainerPath='FourthCoffee/publicweb:v1' fqdn='http://www.fourthcoffee.com'>www.fourthcoffee.com`. Box 4: `az webapp config container set --docker-custom-image-name $dockerHubContainerPath --name $appName --resource-group fourthCoffeePublicWebResourceGroup`.
Show answer & explanationHide answer
Correct answer: A
Box 1: `#/bin/bash appName='FourthCoffeePublicWeb$random' location='WestUS' dockerHubContainerPath='FourthCoffee/publicweb:v1' fqdn='http://www.fourthcoffee.com'>www.fourthcoffee.com`. Box 2: `az webapp create --name $appName --plan AppServiceLinuxDockerPlan --resource-group fourthCoffeePublicWebResourceGroup`. Box 3: `az webapp config container set --docker-custom-image-name $dockerHubContainerPath --name $appName --resource-group fourthCoffeePublicWebResourceGroup`. Box 4: `az webapp config hostname add --webapp-name $appName --resource-group fourthCoffeePublicWebResourceGroup --hostname $fqdn`.
Explanation
The order is: define variables, create the web app, set the container image, and finally add the custom hostname.
Question 12.You are developing a serverless Java application on Azure. You create a new Azure Key Vault to work with secrets from a new Azure Functions application. The application must meet the following requirements: Reference the Azure Key Vault without requiring any changes to the Java code. Dynamically add and remove instances of the Azure Functions host based on the number of incoming application events. Ensure that instances are perpetually warm to avoid any cold starts. Connect to a VNet. Authentication to the Azure Key Vault instance must be removed if the Azure Function application is deleted. You need to grant the Azure Functions application access to the Azure Key Vault. Which three actions should you perform in sequence? 
- A.Box 1: Create the Azure Functions app with a Consumption plan type. Box 2: Create an access policy in Azure Key Vault for the application identity. Box 3: Create a user-assigned managed identity for the application.
- B.Box 1: Create the Azure Functions app with a Premium plan type. Box 2: Create a system-assigned managed identity for the application. Box 3: Create an access policy in Azure Key Vault for the application identity.(correct answer)
Show answer & explanationHide answer
Correct answer: B
Box 1: Create the Azure Functions app with a Premium plan type. Box 2: Create a system-assigned managed identity for the application. Box 3: Create an access policy in Azure Key Vault for the application identity.
Explanation
Requirements: 1. 'Perpetually warm' and 'VNet' require a Functions Premium plan. 2. 'Authentication removed if application is deleted' is the definition of a System-assigned managed identity. 3. Granting access involves creating a Key Vault access policy for that identity.
Question 13.You develop a website. You plan to host the website in Azure. You expect the website to experience high traffic volumes after it is published. You must ensure that the website remains available and responsive while minimizing cost. You need to deploy the website. What should you do?
- A.Deploy the website to a virtual machine. Configure the virtual machine to automatically scale when the CPU load is high.
- B.Deploy the website to an App Service that uses the Shared service tier. Configure the App Service plan to automatically scale when the CPU load is high.
- C.Deploy the website to a virtual machine. Configure a Scale Set to increase the virtual machine instance count when the CPU load is high.
- D.Deploy the website to an App Service that uses the Standard service tier. Configure the App Service plan to automatically scale when the CPU load is high.(correct answer)
Show answer & explanationHide answer
Correct answer: D
Deploy the website to an App Service that uses the Standard service tier. Configure the App Service plan to automatically scale when the CPU load is high.
Explanation
App Service (PaaS) is generally more cost-effective and easier to scale than managing raw VMs. The Standard tier is required for autoscale capabilities, while minimizing management overhead.
Question 14.A company is developing a Java web app. The web app code is hosted in a GitHub repository located at `https://github.com/Contoso/webapp`. The web app must be evaluated before it is moved to production. You must deploy the initial code release to a deployment slot named `staging`. You need to create the web app and deploy the code. How should you complete the commands? 
- A.Box 1: `group`. Box 2: `appservice plan`. Box 3: `webapp`. Box 4: `webapp deployment slot`. Box 5: `webapp deployment source`.(correct answer)
Show answer & explanationHide answer
Correct answer: A
Box 1: `group`. Box 2: `appservice plan`. Box 3: `webapp`. Box 4: `webapp deployment slot`. Box 5: `webapp deployment source`.
Explanation
The order is: create a resource group, create an App Service plan, create the web app, create a deployment slot, and then configure the deployment source for the web app (or specifically for the slot if required, though the CLI `webapp deployment source` often maps the initial source).
Question 15.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? 
- A.Box 1: `__value();`. Box 2: `if (request.getValue('tip') === null) {`. Box 3: `__.upsertDocument(i);`.
- B.Box 1: `__readDocument()('item');`. Box 2: `if (!('tip' in i)) {`. Box 3: `__.replaceDocument(i);`.
- C.Box 1: `getContext().getRequest();`. Box 2: `if (!('tip' in i)) {`. Box 3: `r.setBody(i);`.(correct answer)
- D.Box 1: `getContext().getRequest();`. Box 2: `if (isNaN(i)['tip'] || i['tip'] === null) {`. Box 3: `r.setValue(i);`.
Show answer & explanationHide answer
Correct answer: C
Box 1: `getContext().getRequest();`. Box 2: `if (!('tip' in i)) {`. Box 3: `r.setBody(i);`.
Explanation
In a Cosmos DB pre-trigger, you get the request object using `getContext().getRequest()`. You check if the property 'tip' exists in the document being items (i). If not, you can modify the document body using `r.setBody(i)` to include it (e.g., setting it to 0).
Question 16.You develop an HTTP triggered Azure Function app to process Azure Storage blob data. The app is triggered using an output binding on the blob. The app continues to time out after four minutes. The app must process the blob data. You need to ensure the app does not time out and processes the blob data. Solution: Use the Durable Function async pattern to process the blob data. Does the solution meet the goal?
- A.Yes.(correct answer)
- B.No.
Show answer & explanationHide answer
Correct answer: A
Yes.
Explanation
Durable Functions (specifically the Async HTTP APIs pattern) are designed for long-running operations. They allow the initial function to return a status response quickly while the orchestration continues in the background, avoiding the standard function timeout.
Question 17.You develop an HTTP triggered Azure Function app to process Azure Storage blob data. The app is triggered using an output binding on the blob. The app continues to time out after four minutes. The app must process the blob data. You need to ensure the app does not time out and processes the blob data. Solution: Pass the HTTP trigger payload into an Azure Service Bus queue to be processed by a queue trigger function and return an immediate HTTP success response. Does the solution meet the goal?
- A.Yes.(correct answer)
- B.No.
Show answer & explanationHide answer
Correct answer: A
Yes.
Explanation
Decoupling the processing using a queue is a standard architectural pattern for long-running tasks. The HTTP function simply accepts the request, queues it, and returns a success response, while a separate queue-triggered function handles the actual work without blocking the HTTP response.
Question 18.You develop an HTTP triggered Azure Function app to process Azure Storage blob data. The app is triggered using an output binding on the blob. The app continues to time out after four minutes. The app must process the blob data. You need to ensure the app does not time out and processes the blob data. Solution: Configure the app to use an App Service hosting plan and enable the Always On setting. Does the solution meet the goal?
- A.Yes.
- B.No.(correct answer)
Show answer & explanationHide answer
Correct answer: B
No.
Explanation
While an App Service plan with 'Always On' prevents cold starts, it does not inherently increase the HTTP request timeout for a standard function if the processing logic itself exceeds the limit (typically 230 seconds for the Load Balancer/Front End).
Question 19.You develop a software as a service (SaaS) offering to manage photographs. Users upload photos to a web service which then stores the photos in Azure Storage Blob storage. The storage account type is General-purpose V2. When photos are uploaded, they must be processed to produce and save a mobile-friendly version of the image. The process to produce a mobile-friendly version of the image must start in less than one minute. You need to design the process that starts the photo processing. Solution: Move photo processing to an Azure Function triggered from the blob upload. Does the solution meet the goal?
- A.Yes.(correct answer)
- B.No.
Show answer & explanationHide answer
Correct answer: A
Yes.
Explanation
An Azure Function with a Blob trigger is specifically designed to respond to new or updated blobs. It satisfies the 'start in less than one minute' requirement effectively.
Question 20.You are developing an application that uses Azure Blob storage. The application must read the transaction logs of all the changes that occur to the blobs and the blob metadata in the storage account for auditing purposes. The changes must be in the order in which they occurred, include only create, update, delete, and copy operations and be retained for compliance reasons. You need to process the transaction logs asynchronously. What should you do?
- A.Process all Azure Blob storage events by using Azure Event Grid with a subscriber Azure Function app.
- B.Enable the change feed on the storage account and process all changes for available events.(correct answer)
- C.Process all Azure Storage Analytics logs for successful blob events.
- D.Use the Azure Monitor HTTP Data Collector API and scan the request body for successful blob events.
Show answer & explanationHide answer
Correct answer: B
Enable the change feed on the storage account and process all changes for available events.
Explanation
The Azure Blob Storage Change Feed provides a transaction log of all changes to blobs and their metadata. It is specifically designed for auditing and compliance, ensuring changes are recorded in order and can be processed asynchronously.
Question 21.You plan to create a Docker image that runs an ASP.NET Core application named `ContosoApp`. You have a setup script named `setupScript.ps1` and a series of application files including `ContosoApp.dll`. You need to create a Dockerfile document that meets the following requirements: Call setupScripts.ps1 when the container is built. Run `ContosoApp.dll` when the container starts. The Dockerfile document must be created in the same folder where `ContosoApp.dll` and `setupScript.ps1` are stored. Which five commands should you use to develop the solution? 
- A.Box 1: `CMD ['dotnet', 'ContosoApp.dll']`. Box 2: `FROM microsoft/aspnetcore:latest`. Box 3: `RUN powershell ./setupScript.ps1`. Box 4: `WORKDIR /apps/ContosoApp`. Box 5: `COPY ./ .`.
- B.Box 1: `COPY ./ .`. Box 2: `RUN powershell ./setupScript.ps1`. Box 3: `FROM microsoft/aspnetcore:latest`. Box 4: `CMD ['dotnet', 'ContosoApp.dll']`. Box 5: `WORKDIR /apps/ContosoApp`.
- C.Box 1: `RUN powershell ./setupScript.ps1`. Box 2: `CMD ['dotnet', 'ContosoApp.dll']`. Box 3: `FROM microsoft/aspnetcore:latest`. Box 4: `WORKDIR /apps/ContosoApp`. Box 5: `COPY ./ .`.
- D.Box 1: `FROM microsoft/aspnetcore:latest`. Box 2: `WORKDIR /apps/ContosoApp`. Box 3: `COPY ./ .`. Box 4: `RUN powershell ./setupScript.ps1`. Box 5: `CMD ['dotnet', 'ContosoApp.dll']`.(correct answer)
Show answer & explanationHide answer
Correct answer: D
Box 1: `FROM microsoft/aspnetcore:latest`. Box 2: `WORKDIR /apps/ContosoApp`. Box 3: `COPY ./ .`. Box 4: `RUN powershell ./setupScript.ps1`. Box 5: `CMD ['dotnet', 'ContosoApp.dll']`.
Explanation
A standard Dockerfile for this scenario: 1. `FROM` (base image). 2. `WORKDIR` (set working directory). 3. `COPY` (bring in files). 4. `RUN` (execute setup script during build). 5. `CMD` (define the entry point/command when the container starts).
Question 22.You are developing an Azure Function App that processes images... You need to configure the Function App. What should you do?
- A.Use an App Service plan. Configure the Function App to use an Azure Blob Storage input trigger.
- B.Use a Consumption plan. Configure the Function App to use an Azure Blob Storage trigger.
- C.Use a Consumption plan. Configure the Function App to use a Timer trigger.
- D.Use an App Service plan. Configure the Function App to use an Azure Blob Storage trigger.(correct answer)
- E.Use a Consumption plan. Configure the Function App to use an Azure Blob Storage input trigger.
Show answer & explanationHide answer
Correct answer: D
Use an App Service plan. Configure the Function App to use an Azure Blob Storage trigger.
Explanation
For rapid processing and minimal latency with heavy workloads (like image processing), the App Service plan (dedicated) can be better than Consumption (serverless) to avoid cold starts and processing delays. Specifically, a 'Blob storage trigger' is required to react to uploads.
Question 23.You are configuring a new development environment for a Java application... How should you complete the Azure Resource Manager template? 
- A.Box 1: `copyIndex`. Box 2: `copy`. Box 3: `dependsOn`.(correct answer)
- B.Box 1: `copy`. Box 2: `copyIndex`. Box 3: `dependsOn`.
- C.Box 1: `priority`. Box 2: `dependsOn`. Box 3: `copyIndex`.
- D.Box 1: `priority`. Box 2: `copyIndex`. Box 3: `dependsOn`.
Show answer & explanationHide answer
Correct answer: A
Box 1: `copyIndex`. Box 2: `copy`. Box 3: `dependsOn`.
Explanation
In ARM templates: 1. `copyIndex()` is used to get the iteration number when creating multiple resources. 2. `copy` is used to iterate over a resource definition. 3. `dependsOn` ensures that a resource (like VMSS) is only created after its dependencies (Storage, Networking) are ready.
Question 24.You are developing an Azure Function App by using Visual Studio... Question 1: The code will log the time that the order was processed from the queue. 
- A.Yes.
- B.No.(correct answer)
Show answer & explanationHide answer
Correct answer: B
No.
Explanation
If the code logs `DateTime.Now`, it logs the current time of execution, not necessarily when the item was first picked up or 'processed' if 'processed' implies a specific timestamp from the queue entity.
Question 25.You are developing an Azure Function App by using Visual Studio... Question 2: When the ProcessOrders function fails, the function will retry up to five times for a given order, including the first try. 
- A.Yes.(correct answer)
- B.No.
Show answer & explanationHide answer
Correct answer: A
Yes.
Explanation
Azure Storage Queue triggers have a default retry policy (dequeue count) that typically retries a message up to 5 times before moving it to a poison queue.
Question 26.You are developing an Azure Function App by using Visual Studio... Question 3: When there are multiple orders in the queue, a batch of orders will be received from the queue and the ProcessOrders function will run multiple instances concurrently to process the orders. 
- A.Yes.(correct answer)
- B.No.
Show answer & explanationHide answer
Correct answer: A
Yes.
Explanation
Azure Functions with Queue triggers scale out automatically to process multiple messages concurrently across multiple instances.
Question 27.You are developing an Azure Function App by using Visual Studio... Question 4: The ProcessOrders function will output the order to an Orders table in Azure Table Storage. 
- A.Yes.(correct answer)
- B.No.
Show answer & explanationHide answer
Correct answer: A
Yes.
Explanation
If the function has an output binding for Azure Table Storage (indicated by attributes like `[Table('Orders')]`), it will indeed write the object to that table.
Question 28.You are developing a solution for a hospital to support the following use cases... Which consistency levels should you implement? 
- A.Box 1: Strong. Box 2: Consistent Prefix. Box 3: Eventual.
- B.Box 1: Eventual. Box 2: Strong. Box 3: Bounded Staleness.
- C.Box 1: Consistent Prefix. Box 2: Bounded Staleness. Box 3: Eventual.
- D.Box 1: Strong. Box 2: Bounded Staleness. Box 3: Eventual.(correct answer)
Show answer & explanationHide answer
Correct answer: D
Box 1: Strong. Box 2: Bounded Staleness. Box 3: Eventual.
Explanation
1. 'Strong' consistency ensures the most recent details are always retrieved. 2. 'Bounded Staleness' allows for some lag (current or prior version) while maintaining order. 3. 'Eventual' is the lowest latency/cost and is appropriate for final billing records where immediate consistency across all replicas isn't as critical as cost/latency once assessments are done.
Question 29.You are configuring a development environment for your team... Which tools or services should you use? 
- A.Generalize the VM: Visual Studio command prompt. Store images: Azure Data Lake Storage.
- B.Generalize the VM: Azure PowerShell. Store images: Azure Blob Storage.(correct answer)
- C.Generalize the VM: Visual Studio command prompt. Store images: Azure File Storage.
- D.Generalize the VM: Azure PowerShell. Store images: Azure File Storage.
Show answer & explanationHide answer
Correct answer: B
Generalize the VM: Azure PowerShell. Store images: Azure Blob Storage.
Explanation
To save a customized VM: 1. Generalize the VM from within the OS (using Sysprep/PowerShell). 2. Capture the image and store it, typically in a Storage Account as a VHD in Blob Storage (or now more commonly in a Shared Image Gallery).
Question 30.You are preparing to deploy a website to an Azure Web App... What are two possible ways to achieve this goal?
- A.Add the path to the static content generation tool to `WEBSITE_RUN_FROM_PACKAGE` setting in the `host.json` file.
- B.Add a `PreBuild` target in the websites `csproj` project file that runs the static content generation script.(correct answer)
- 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.Create a file named `.deployment` in the root of the repository that calls a script which generates the static content and deploys the website.(correct answer)
Show answer & explanationHide answer
Correct answer: B, D
Add a `PreBuild` target in the websites `csproj` project file that runs the static content generation script. / Create a file named `.deployment` in the root of the repository that calls a script which generates the static content and deploys the website.
Explanation
1. A `PreBuild` event in the project file runs during the build phase of continuous deployment (Kudu). 2. A `.deployment` file allows customizing the deployment script, giving you full control over tasks to run (like static generation) before the final artifacts are moved to the webroot.
Ready for the full AZ-204 exam?
Get all 220+ Questions, timed simulation, and weak-area analytics. Plans from $2.99 — credits never expire.
Frequently Asked Questions
Are these real AZ-204 practice questions?+
Is the AZ-204 exam hard?+
How many questions are on the real AZ-204 exam?+
Do I need to sign up to use these questions?+
Keep studying
Pass AZ-204 on your first try
Join candidates using DummyExams to practice with realistic timed exams, detailed explanations, and weak-area analytics.
Start full AZ-204 practice exam