AZ-204 sample questions with answers
The other 201 questions are in the practice tool, with answers revealed as you go.
Start 20 questionsDevelop Azure compute solutions
- A fintech company hosts several internal web tools on one App Service Plan. A reporting tool has recently begun using far more memory than its neighbors, and their response times have slipped. The company wants the reporting tool isolated from the others without paying to scale up the neighbors. What should the team do?
- A Durable Functions orchestrator calls three activities one after another on a Premium plan. The middle activity may run for several minutes. What must be configured so that this activity is not cut off early?
- A container app serving a public API should add replicas as soon as any single replica is handling about 100 requests at the same moment. Which scale rule configuration matches this requirement?
- Which metric can an Azure Monitor autoscale rule on an App Service plan use to add instances when the average load across them climbs?
- A loan-approval orchestration in Durable Functions must pause until an underwriter records a decision, which can take several days. If no decision arrives before a deadline, the workflow should escalate. Which pattern fits?
- A company runs six web apps in one resource group in East US, all hosted on the same App Service plan. They need one TLS certificate that every app can bind to, without uploading the certificate separately to each app. Where should the certificate be stored?
- A timer-triggered function runs every hour. When the Function App is deployed or restarted, the team wants one run right away, followed by the normal hourly schedule. Which setting provides this?
Develop for Azure storage
- Several instances of a worker service read the change feed of a Cosmos DB container. After a restart, each instance must resume from where the group left off, and the instances must divide the partitions among themselves. Where is that coordination state kept?
- A media app uploads camera files of around 10 GB each over unreliable mobile networks. After a dropped connection, the upload should continue from the last successful chunk rather than starting over. Which client technique should be used?
- A telemetry container will hold billions of device readings. Which property chosen when the container is created decides how items and throughput are spread across physical storage units?
- A media company keeps raw footage that editors revisit about twice a year, but editors need it retrievable immediately when requested. Which Blob Storage access tier gives the best balance of storage cost and instant access here?
- A social app has mobile users across several cities. Each user's own writes must appear immediately in that user's later reads, while other users may see slightly older data. Which Cosmos DB consistency level meets this requirement?
- A healthcare app stores clinical documents in blob storage. The app must encrypt each document before it leaves the client, using keys held in Key Vault, so the storage service only ever receives ciphertext. Which approach meets this?
- A team is moving an application from Azure Table Storage to the Cosmos DB Table API. It wants to keep its existing Azure Tables SDK calls unchanged. What change to the application is required?
- A team has an existing app that uses the Azure Table Storage SDK to store settings as key-value entities. They want to move the data to a globally distributed database with low-latency reads while changing as little application code as possible. Which option fits?
Implement Azure security
- An iOS field-service app lets technicians sign in with Microsoft Entra ID and then calls a protected Azure Functions HTTP API. The app is a public client and has no back-end component of its own. Which MSAL flow should it use to acquire tokens for the API?
- A React single-page app hosted on a static site needs users to sign in with Entra ID and then call a protected REST API. Which OAuth 2.0 grant should the SPA's client registration use?
- A mobile backend issues short-lived download links for private blobs. Your security team has banned storing account keys in application configuration. Which signing approach satisfies this rule?
- One Azure Function app runs three functions, each calling a different service: a database, a message queue, and a storage account. The team wants each service's identity to hold only the permissions that service needs. What should they create?
Monitor, troubleshoot and optimize solutions
- A checkout request passes through an API gateway, an order service and a payment service. The team needs to see the full timeline of one slow request across all of these components. Which Application Insights capability provides this?
- Your product API must page the on-call engineer when its average server response time stays above two seconds across a rolling five-minute window. Which Azure Monitor configuration does this with the least delay?
Connect to and consume services
- An Event Grid webhook delivers to an HTTPS endpoint that rejects calls lacking an Authorization header with a bearer token. You need that header on every delivery, with the token kept out of the URL. What should you do?
- Your API Management instance fronts a legacy service that returns XML. Modern clients expect JSON responses, so the gateway must convert the backend's XML output. Which policy and section should you use?
- When you create an Event Grid subscription that points at your HTTPS webhook, the endpoint receives a handshake before any real events arrive. What must the endpoint do to prove it controls the URL?
- A payments team is designing a producer that pushes JSON order events onto a basic Azure Storage queue. An engineer proposes sending payloads of roughly 100 KB per event. What is the largest encoded size a single queue entry can have for current API versions?
- A worker dequeues a job from a storage queue, but its transcoding step may run for many hours. It must keep the message hidden from other workers for that whole period and will renew the hidden period as it goes. What is the longest hidden period the service accepts for one queue message?
- Your compliance system enqueues audit records onto an Azure Storage queue. Each record must remain in the queue until a separate retention job deletes it, however long that takes. Which messagettl value should the producer send on Put Message?
- Several instances of a stream processor split the work across partitions. When one instance restarts, the others must resume each partition from where it stopped. Where does the Event Processor Client keep its per-partition progress markers?
- Telemetry from each vehicle must reach one partition in the order it was sent, so a single consumer can process a given vehicle's readings sequentially. How should the publisher route each event?