Free AZ-204 Practice Test Questions and Answers (2026)

View Mode
Q: 1

DRAG DROP You need to add YAML markup at line CS17 to ensure that the ContentUploadService can access Azure Storage access keys. How should you complete the YAML markup? To answer, drag the appropriate YAML segments to the correct locations. Each YAML 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. AZ-204 question

Drag & Drop
30 comments in the community discussion
6
volumeMounts → Target 1, volumes → Target 2, secret → Target 3. That's how you attach a Kubernetes secret to a pod via a volume and then mount it into the container. Pretty sure this is the pattern for giving your service access to key files. Anyone see a different approach working?
5
Man, these drag and drops are always confusing-volumeMounts Target 1, volumes Target 2, secret Target 3.
Q: 2

HOTSPOT You develop a Python application for image rendering. The application uses GPU resources to optimize rendering processes. You have the following requirements: • The application must be deployed to a Linux container. • The container must be stopped when the image rendering is complete. AZ-204 question

Your Answer
24 comments in the community discussion
7
Looks like a reference question, so check the official Microsoft docs or the learning path labs. The right image is page_687_img_1.JPG.
6
Similar question came up on a practice test, matching answer was page_687_img_1.JPG.
Q: 3
You need to implement the processing of enqueuer inventory items. Which message value should you use?
Options
40 comments in the community discussion
5
Option B seen this type in both official docs and exam labs.
4
Option B
Q: 4

DRAG DROP 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? To answer, move all of the Azure CLI command from the list of commands to the answer area and arrange them in the correct order. Enlarged

Drag & Drop
29 comments in the community discussion
6
Saw something almost identical in a practice exam. Vars first, then webapp create, container config, finally hostname add. That's the sequence Azure expects. Pretty sure that's correct but open to corrections.
6
Yeah, that's the flow I've always used: variables first, then create webapp, set the container image, finally add custom domain. Azure won't accept a domain mapping if the app doesn't exist yet. I think this matches how CLI lets you build deployments step by step. Anyone put hostname before container config and have is
Q: 5
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 question, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You are developing a website that will run as an Azure Web App. Users will authenticate by using their Azure Active Directory (Azure AD) credentials. You plan to assign users one of the following permission levels for the website: admin, normal, and reader. A user’s Azure AD group membership must be used to determine the permission level. You need to configure authorization. Solution: Configure the Azure Web App for the website to allow only authenticated requests and require Azure AD log on. Does the solution meet the goal?
Options
30 comments in the community discussion
3
B . Had something like this in a mock and just enabling Azure AD authentication won’t set the group-based permissions, it’s only auth not authorization. You still need to add logic or claims to handle group mapping. Anyone agree?
2
Option B saw a similar question in a practice test and it matched this answer.
Q: 6
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 VM that is triggered from Azure Storage Queue events. Does the solution meet the goal?
Options
33 comments in the community discussion
1
Probably B. Storage Queue doesn't guarantee FIFO and VMs aren't the cheapest here.
1
B. Storage Queue isn't strict FIFO, that's a classic trap on these. VM cost doesn't help either, so I see B as the right pick here. If anyone thinks Storage Queue is enough for true FIFO, let me know.
Q: 7

HOTSPOT You are preparing to deploy a Python website to an Azure Web App using a container. The solution will use multiple containers in the same container group. The Dockerfile that builds the container is as follows: AZ-204 question You build a container by using the following command. The Azure Container Registry instance named images is a private registry. AZ-204 question The user name and password for the registry is admin. The Web App must always run the same version of the website regardless of future builds. You need to create an Azure Web App to run the website. How should you complete the commands? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. AZ-204 question

Your Answer
28 comments in the community discussion
6
Looks like the right pick is to use the version tag so the app always pulls that exact release. People often trip on thinking digest is needed but since the question just says "same version," not immutability, version tag it is.
4
HTTPS://KXBJSYUHCEGGSYVXDKOF.SUPABASE.CO/STORAGE/V1/OBJECT/PUBLIC/FILE-IMAGES/AZ-204/PAGE_435_IMG_2.JPG
Q: 8
You are implementing an Azure API app that uses built-in authentication and authorization functionality. All app actions must be associated with information about the current user. You need to retrieve the information about the current user. What are two possible ways to achieve the goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
Options
30 comments in the community discussion
1
Tough one since headers can be tricky on the client, but I'd still pick A and C. Anyone disagree with both those?
1
Not B, it's definitely A and C. Headers and the /.auth/me endpoint are how Easy Auth exposes user data, seen this in exam practice before. D is just login trigger, won't give user info. Anyone see it differently?
Q: 9

HOTSPOT You are developing a microservices-based application that uses Azure Container Apps. The application consists of several containerized services that handle tasks, such as processing orders, managing inventory, and generating reports. You must secure the container apps All apps must reside in the same virtual network, share the same Dapr configuration, and share the same logging location. Apps must support the configuration of the amount of memory and compute resources available to containers. You need to configure the Azure Container App. How should you complete the CLI command' To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Your Answer
41 comments in the community discussion
6
Yeah has to be the one using -enable-workload-profiles.
6
Option with -enable-workload-profiles is right, not just the default env create. The profiles part is easy to miss.
Q: 10

DRAG DROP You need to ensure disaster recovery requirements are met. What code should you add at line PC16? To answer, drag the appropriate code fragments to the correct locations. Each code fragment 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. AZ-204 question

Drag & Drop
34 comments in the community discussion
6
SingleTransferContext → ShouldOverwriteCallbackAsync → true. Directory/TransferContext is a trap for single blob, always-overwrite needed for DR copies.
6
I don’t think Directory TransferContext fits here since the requirement is for a single blob copy, not a folder. SingleTransferContext → ShouldOverwriteCallbackAsync → true matches how you guarantee DR overwrites every time, which is needed for recovery. Directory/ShouldTransferCallbackAsync/false is proba
Q: 11
You are developing an Azure Cosmos DB solution by using the Azure Cosmos DB SQL API. The data includes millions of documents. Each document may contain hundreds of properties. The properties of the documents do not contain distinct values for partitioning. Azure Cosmos DB must scale individual containers in the database to meet the performance needs of the application by spreading the workload evenly across all partitions over time. You need to select a partition key. Which two partition keys can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.
Options
10 comments in the community discussion
A and C. Only those will really maximize distribution across partitions in Cosmos DB. Pretty sure that's what Microsoft wants here.
A C. Similar question popped up for me on a practice exam, patterns like random or hash suffixes are what Azure recommends when you don't have natural high-cardinality keys.
Q: 12

HOTSPOT You are creating a CLI script that creates an Azure web app related services in Azure App Service. The web app uses the following variables: AZ-204 question You need to automatically deploy code from GitHub to the newly created web app. How should you complete the script? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. AZ-204 question

Your Answer
6 comments in the community discussion
6
Right tool is az webapp deployment source config here. HTTPS://KXBJSYUHCEGGSYVXDKOF.SUPABASE.CO/STORAGE/V1/OBJECT/PUBLIC/FILE-IMAGES/AZ-204/PAGE_176_IMG_1.JPG
5
Yeah, saw something just like this in a practice set. HTTPS://KXBJSYUHCEGGSYVXDKOF.SUPABASE.CO/STORAGE/V1/OBJECT/PUBLIC/FILE-IMAGES/AZ-204/PAGE_176_IMG_1.JPG
Q: 13

HOTSPOT You develop a containerized application. You plan to deploy the application to a new Azure Container instance by using a third-party continuous integration and continuous delivery (CI/CD) utility. The deployment must be unattended and include all application assets. The third-party utility must only be able to push and pull images from the registry. The authentication must be managed by Azure Active Directory (Azure AD). The solution must use the principle of least privilege. You need to ensure that the third-party utility can access the registry. Which authentication options should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. AZ-204 question

Your Answer
10 comments in the community discussion
6
Totally agree with using a service principal and AcrPush. That combo gives the CI/CD tool just enough rights for push and pull, nothing extra. Contributor is way too broad for this kind of setup. I think this lines up with both the exam's least privilege angle and how you'd do it in real life, but open if anyone hit
6
Service principal with AcrPush role is the best fit here. That's what official docs and most exam practice say for least privilege when using Azure AD auth. I checked the Azure guide too, matches up.
Q: 14

DRAG DROP An organization plans to deploy Azure storage services. You need to configure shared access signature (SAS) for granting access to Azure Storage. Which SAS types should you use? To answer, drag the appropriate SAS types to the correct requirements. Each SAS 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. AZ-204 question

Drag & Drop
8 comments in the community discussion
1
Account-level → Delegate to one or more services, Service-level → just a single storage service, User delegation → Secure with Azure AD creds. That’s how I’d map it. I think that's right but maybe there’s overlap for the first two in rare cases?
1
Account-level -> Delegate access to resources in one or more of the storage servicesService-level -> Delegate access to a resource in a single storage serviceUser delegation -> Secure a resource by using Azure AD credentials.Nice, the requirements are really clear here. Pretty sure this matches wha
Q: 15

DRAG DROP You are developing a microservices solution. You plan to deploy the solution to a multinode Azure Kubernetes Service (AKS) cluster. You need to deploy a solution that includes the following features: reverse proxy capabilities configurable traffic routing TLS termination with a custom certificate Which components should you use? To answer, drag the appropriate components to the correct requirements. Each component 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. AZ-204 question

Drag & Drop
6 comments in the community discussion
6
Pretty sure it's Helm for deploying the solution, KubeCtl for checking cluster and external IPs, and Ingress Controller to route traffic with TLS termination. Some might pick CoreDNS or Virtual Kubelet by mistake, but they don't fit these requirements. Anyone see it differently?
5
Helm → Deploy solution, KubeCtl → View cluster and external IP, Ingress Controller → Public endpoint. Seen this mapping before, pretty sure it's right but jump in if you disagree.
Q: 16
You need to migrate on-premises shipping data to Azure. What should you use?
Options
7 comments in the community discussion
1
D , B is tempting if you see Cosmos but this one points to D for DB migration.
1
Its D, not B. Saw similar in practice sets and B is a trap unless it specifically says Cosmos format.
Q: 17

HOTSPOT 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. To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. AZ-204 question

Your Answer
7 comments in the community discussion
9
Saw something like this in recent exam reports, the answer is the second image with the header and Base64 certificate.
5
I don’t think just any method works here, it has to be the X-ARR-ClientCert header for Azure Web Apps. The trap is thinking you can pull the cert straight from the request properties, but on App Service it’s always passed in Base64 through that header. Seen this called out in several practice sets. Anyone disagree?
Q: 18

DRAG DROP You need to ensure that PolicyLib requirements are met. 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. AZ-204 question

Drag & Drop
9 comments in the community discussion
6
ITelemetry Initializer, Initialize, telemetry.Context, EventGridController.EventId.Value. This one is really clear compared to other drag and drop questions.
5
ITelemetry Initializer, Initialize, telemetry.Context, EventGridController.EventId.Value. That matches the Application Insights extension pattern for tagging telemetry. ITelemetryProcessor is just for filtering, not adding properties. I think this fits the PolicyLib ask, but if you see a catch let me know.
Q: 19

DRAG DROP 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? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order. AZ-204 question

Drag & Drop
9 comments in the community discussion
5
Not quite, I don't think you need any update commands. The correct order should be: az group create → az appservice plan create → az webapp create. The trap is using update before you've actually created anything. Let me know if anyone disagrees, but that's what I've seen on other exam reports.
4
az group create → az appservice plan create → az webapp create is the sequence you want. Makes sense since there's no existing group in the right region, then you need the Linux plan before spinning up the container. Seen similar logic in official docs, but if someone caught something I missed, let me know.
Q: 20

HOTSPOT You are creating an app that uses Event Grid to connect with other services. Your app's event data will be sent to a serverless function that checks compliance. This function is maintained by your company. You write a new event subscription at the scope of your resource. The event must be invalidated after a specific period of time. You need to configure Event Grid to ensure security. What should you implement? To answer, select the appropriate options in [he answer area. NOTE: Each correct selection is worth one point AZ-204 question

Your Answer
9 comments in the community discussion
6
Makes sense, SAS token fits here. Time-limited credential handles automatic invalidation like the question mentions.
5
Not sure why some picks are calling out validationCode handshake for the time-limited part. That's just for endpoint proving, not access expiration. SAS tokens line up with "must be invalidated after a specific period."
Question 1 of 20

What's covered in this practice questions set

3: Implement Azure security · 7 questions

📖 About this Domain

This domain focuses on securing Azure solutions. You will implement authentication and authorization using the Microsoft Identity Platform. It also covers securing application data with services like Azure Key Vault and Managed Identities.

🎓 What You Will Learn

  • Implement user authentication and authorization using the Microsoft Identity Platform and Microsoft Authentication Library (MSAL).
  • Implement secure access to Azure resources by using managed identities for Azure resources.
  • Secure application configuration data by using Azure App Configuration and Azure Key Vault.
  • Manage keys, secrets, and certificates using the Azure Key Vault SDK.

🛠️ Skills You Will Build

  • Integrating applications with Azure Active Directory to enable secure user sign-in and API access.
  • Configuring managed identities to provide Azure resources with an identity in Azure AD for authentication.
  • Storing and retrieving application secrets programmatically from Azure Key Vault to avoid hardcoded credentials.
  • Generating Shared Access Signatures (SAS) to provide delegated, secure access to Azure Storage resources.

💡 Top Tips to Prepare

  • Practice authentication flows by building a sample application that uses MSAL to acquire tokens for Microsoft Graph.
  • Understand the distinction between system-assigned and user-assigned managed identities and their specific use cases.
  • Write code that utilizes the Azure Key Vault SDK to retrieve secrets, keys, and certificates.
  • Focus on the programmatic creation and management of Shared Access Signatures (SAS) for Azure Storage.

1: Develop Azure compute solutions · 5 questions

📖 About this Domain

This domain focuses on implementing Azure compute solutions to host application workloads. You will provision, configure, and deploy code to IaaS and PaaS services. Key technologies include Azure Virtual Machines, App Service, Azure Functions, and container-based solutions.

🎓 What You Will Learn

  • Implement IaaS solutions by provisioning and configuring Azure Virtual Machines using ARM templates and extensions.
  • Create and configure Azure App Service Web Apps, including App Service plans, deployment slots, and scaling settings.
  • Implement Azure Functions by creating function apps and implementing triggers and bindings for event-driven execution.
  • Deploy containerized solutions by managing images in Azure Container Registry and running them on Azure Container Instances or Azure Kubernetes Service.

🛠️ Skills You Will Build

  • Automating the deployment and configuration of virtual machines using declarative templates and command-line tools.
  • Developing and deploying web applications and APIs to a managed PaaS environment with Azure App Service.
  • Building serverless, event-driven architectures using Azure Functions to process data and integrate services.
  • Containerizing applications with Docker and orchestrating their deployment and scaling on Azure's container platforms.

💡 Top Tips to Prepare

  • Master the Azure CLI and PowerShell commands for creating and managing App Service, Functions, and VMs.
  • Understand the specific use cases and limitations for each compute option: VMs, App Service, Functions, ACI, and AKS.
  • Practice the complete container workflow from Dockerfile creation to pushing images to ACR and deploying to ACI.
  • Focus on the configuration details of App Service plans and Azure Function hosting plans, including consumption versus dedicated tiers.

2: Develop for Azure storage · 5 questions

📖 About this Domain

This domain covers implementing solutions that use Azure Blob Storage and Azure Cosmos DB. It focuses on programmatic interaction with these storage services using their respective SDKs, including managing data lifecycle, security, and consistency levels.

🎓 What You Will Learn

  • Interact with Azure Blob Storage using the .NET SDK to manage blobs, containers, and storage accounts.
  • Utilize the Azure Cosmos DB SDK to perform database operations, manage containers, and configure consistency levels.
  • Implement secure access to storage resources using Shared Access Signatures (SAS) and access policies.
  • Configure blob properties, metadata, and data lifecycle management policies for storage optimization.

🛠️ Skills You Will Build

  • Programmatically perform CRUD operations on Azure Blob Storage and Azure Cosmos DB via their respective SDKs.
  • Implement data partitioning strategies in Cosmos DB and manage blob lifecycle policies.
  • Generate and manage SAS tokens and stored access policies for secure, delegated access to storage.
  • Select appropriate Cosmos DB consistency levels and Blob Storage tiers to optimize for cost and performance.

💡 Top Tips to Prepare

  • Gain practical experience with the Azure.Storage.Blobs and Microsoft.Azure.Cosmos NuGet packages in a .NET project.
  • Practice creating different types of SAS tokens, including user delegation SAS, and understand their scope and permissions.
  • Understand the impact of partition keys on Request Unit (RU) consumption and query performance in Cosmos DB.
  • Memorize the use cases for Hot, Cool, Cold, and Archive storage tiers and how to configure lifecycle management rules.

4: Monitor, troubleshoot, and optimize Azure solutions · 2 questions

📖 About this Domain

This domain covers application performance and reliability in Azure. It focuses on implementing caching with Azure Cache for Redis and Azure CDN. You will also instrument solutions with Application Insights and Azure Monitor for effective troubleshooting.

🎓 What You Will Learn

  • You will learn to implement caching solutions using Azure Cache for Redis and configure Azure CDN for content delivery.
  • You will learn to instrument an application with the Application Insights SDK to collect telemetry data.
  • You will learn to analyze logs and metrics using Azure Monitor and Log Analytics to diagnose application issues.
  • You will learn to configure alerts and web tests in Application Insights for proactive application health monitoring.

🛠️ Skills You Will Build

  • You will build the skill to configure cache-aside patterns and expiration policies in Azure Cache for Redis.
  • You will build the skill to add code-based instrumentation to an application for custom event and dependency tracking.
  • You will build the skill to write Kusto Query Language (KQL) queries to investigate failures and performance bottlenecks.
  • You will build the skill to implement alerting rules in Azure Monitor based on metrics and log data.

💡 Top Tips to Prepare

  • Get hands-on experience configuring an Azure Cache for Redis instance and connecting a client application.
  • Practice instrumenting a web application with the Application Insights SDK and exploring the telemetry in the Azure portal.
  • Focus on learning basic Kusto Query Language (KQL) syntax for querying logs in Log Analytics.
  • Create and trigger various Azure Monitor alerts, including metric alerts and log search alerts, to understand their configuration.

5: Connect to and consume Azure services and third-party services · 1 questions

📖 About this Domain

This domain covers the integration of disparate services into a cohesive application. You will implement solutions for API governance, event-driven architectures, and message-based communication. Key services include API Management, Event Grid, and Service Bus for building decoupled, scalable systems.

🎓 What You Will Learn

  • Implement API Management: Learn to create an APIM instance, define APIs, and apply policies for transformation and security.
  • Develop event-based solutions: Learn to implement solutions using Event Grid to handle events from Azure resources and custom topics.
  • Develop message-based solutions: Learn to use Azure Queue Storage and Azure Service Bus queues and topics for reliable, asynchronous messaging.

🛠️ Skills You Will Build

  • API Gateway Configuration: You will build skills to configure API Management as a facade, securing and managing backend APIs.
  • Event-driven Programming: You will build the ability to implement handlers for Event Grid subscriptions to create reactive applications.
  • Asynchronous Messaging Implementation: You will build proficiency in using SDKs to send and receive messages with Service Bus and Queue Storage.

💡 Top Tips to Prepare

  • Practice API Management Policies: Focus on hands-on labs for applying policies like rate-limiting, caching, and JWT validation.
  • Differentiate Azure Messaging Services: Know the specific use cases and differences between Queue Storage, Event Grid, Event Hubs, and Service Bus.
  • Code with Azure SDKs: Implement producers and consumers for Service Bus and Queue Storage to solidify your understanding of the programming model.
  • Understand Event Grid Schemas: Memorize the structure of Event Grid events and the CloudEvents schema to correctly parse incoming event data.

Premium Access Includes

  • Quiz Simulator
  • Exam Mode
  • Progress Tracking
  • Question Saving
  • Flash Cards
  • Drag & Drops
  • 3 Months Access
  • PDF Downloads
Get Premium Access
Scroll to Top

FLASH OFFER

Days
Hours
Minutes
Seconds

avail 10% DISCOUNT on YOUR PURCHASE