All Practice Exams

200+ Free Azure AZ-204 Practice Questions

Pass your Microsoft Azure Developer Associate (AZ-204) exam on the first try — instant access, no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
~65-70% Pass Rate
200+ Questions
100% Free
1 / 200
Question 1
Score: 0/0

You are deploying an ASP.NET Core application to Azure App Service. You need to configure deployment slots to enable zero-downtime deployments. Which of the following is a valid deployment slot setting that differs from the production slot?

A
B
C
D
to track
2026 Statistics

Key Facts: Azure AZ-204 Exam

65-70%

Est. Pass Rate

Industry estimate

700/1000

Passing Score

Microsoft

80-120 hrs

Study Time

Recommended

100 min

Exam Duration

Microsoft

$165

Exam Fee

Microsoft

1 year

Renewal Cycle

Free renewal assessment

The AZ-204 exam has approximately 50 questions in 100 minutes, requiring a scaled score of 700/1000. The exam covers developing Azure compute solutions (25-30%), Azure storage (15-20%), Azure security (20-25%), monitoring and optimization (15-20%), and connecting to services (15-20%).

Sample Azure AZ-204 Practice Questions

Try these sample questions to test your Azure AZ-204 exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 200+ question experience with AI tutoring.

1You are deploying an ASP.NET Core application to Azure App Service. You need to configure deployment slots to enable zero-downtime deployments. Which of the following is a valid deployment slot setting that differs from the production slot?
A.Always On setting cannot be configured per slot
B.Connection strings can be marked as slot-specific
C.The runtime stack version is always shared across all slots
D.Custom domain names are automatically inherited by all slots
Explanation: Connection strings and app settings in Azure App Service can be configured as slot-specific (sticky settings). This allows you to have different database connections or configuration values for staging vs production slots. When you swap slots, these marked settings remain with the slot. Always On, runtime stack, and custom domains can also be configured per slot.
2Your company has an Azure App Service Plan with multiple web apps. You notice that one web app is consuming excessive memory, affecting other apps on the same plan. What should you do to resolve this issue while minimizing costs?
A.Enable auto-scaling for all web apps on the plan
B.Move the high-memory app to a separate App Service Plan
C.Increase the instance size of the current App Service Plan
D.Configure memory-based auto-healing for the problematic app
Explanation: Azure App Service Plans share compute resources among all apps deployed to them. If one app consumes excessive resources (noisy neighbor problem), it affects all other apps. The best solution is to isolate the resource-intensive app to its own App Service Plan. While auto-scaling or increasing instance size might help temporarily, it does not address the root cause and increases costs for all apps. Auto-healing can restart the app but does not prevent resource contention.
3You need to configure custom domain HTTPS for an Azure App Service using a certificate that you purchased from a third-party certificate authority. What is the correct sequence of steps?
A.Upload certificate → Verify domain ownership → Bind certificate to custom domain → Enable HTTPS Only
B.Verify domain ownership → Upload certificate → Bind certificate to custom domain → Enable HTTPS Only
C.Enable HTTPS Only → Upload certificate → Bind certificate to custom domain → Verify domain ownership
D.Verify domain ownership → Enable HTTPS Only → Upload certificate → Bind certificate to custom domain
Explanation: The correct sequence is: First, verify domain ownership using DNS records (A or CNAME). Then upload the PFX certificate to App Service with its password. Next, bind the certificate to the custom domain (either SNI or IP-based SSL). Finally, enable HTTPS Only to redirect all HTTP traffic to HTTPS. Domain verification must come first because App Service requires proof of ownership before allowing certificate binding.
4You are designing a deployment strategy for an Azure App Service that requires minimal downtime during updates. The application has a database that will be updated as part of the deployment. Which approach should you use?
A.Use deployment slots with auto-swap and backward-compatible database changes
B.Deploy directly to production during off-peak hours
C.Use local Git deployment with continuous integration
D.Use ZIP deployment with run-from-package enabled
Explanation: Deployment slots with auto-swap provide zero-downtime deployments. The key is to ensure database schema changes are backward-compatible (additive changes only, no destructive changes). With auto-swap, the staging slot warms up before swapping, ensuring the new version is ready to serve traffic. Direct production deployment causes downtime, and while run-from-package helps with atomic deployments, it does not address database compatibility issues.
5Your Azure App Service application experiences slow response times during peak hours. Monitoring shows high CPU utilization but memory usage remains low. Which scaling approach is most appropriate?
A.Scale up to a higher pricing tier with more memory
B.Scale out by increasing the instance count based on CPU percentage
C.Enable Always On to prevent cold starts
D.Configure vertical partitioning of the application database
Explanation: When CPU is high but memory is low, horizontal scaling (scale out) is the appropriate solution. Adding more instances distributes the load and reduces CPU utilization per instance. Scaling up (vertical) would provide more CPU per instance but is less cost-effective and has an upper limit. Always On prevents cold starts but does not address high CPU during peak load. Database partitioning might help if the database was the bottleneck, but the monitoring shows CPU is the issue.
6You are developing an Azure Function that processes messages from Azure Service Bus. You need to ensure that if processing fails, the message is retried up to 3 times before being moved to the dead-letter queue. Which configuration should you use?
A.Configure maxDeliveryCount on the Service Bus subscription
B.Set functionRetry.maxRetryCount in host.json to 3
C.Implement exponential backoff in the function code
D.Set lock duration to 5 minutes on the Service Bus queue
Explanation: The maxDeliveryCount property on Service Bus queues/subscriptions controls how many times a message is delivered before being moved to the dead-letter queue. This is the correct place to configure retry behavior for Service Bus-triggered functions. While host.json functionRetry can configure retries at the function level, it is separate from the Service Bus delivery count. Exponential backoff is useful for transient error handling but does not control dead-letter behavior. Lock duration affects how long a message is reserved for a consumer but not retry count.
7You need to create an Azure Function that runs every hour to process data from an Azure Storage table. Which trigger type should you use?
A.Timer trigger with CRON expression "0 0 * * * *"
B.Timer trigger with CRON expression "0 0 * * *"
C.Queue trigger connected to a queue that receives hourly messages
D.Event Grid trigger subscribed to a scheduled event
Explanation: For an hourly schedule, use a Timer trigger with the CRON expression "0 0 * * *" (6 fields: {second} {minute} {hour} {day} {month} {day-of-week}). This runs at minute 0 of every hour. "0 0 * * * *" runs every hour but includes seconds as the first field which is not the standard format for Azure Functions CRON (which uses 5 fields by default, or 6 if seconds are enabled). Queue triggers require an external process to enqueue messages, and Event Grid is for reacting to events, not scheduling.
8Your Azure Function app uses the Consumption plan and experiences cold starts that cause latency issues. You want to reduce cold start times while keeping costs optimized. What should you do?
A.Migrate to a Premium plan and configure minimum instances
B.Enable Always On in the function app settings
C.Increase the function timeout in host.json
D.Use the isolated worker process model
Explanation: The Premium plan offers pre-warmed workers that eliminate cold starts. By configuring minimum instances, you ensure at least one worker is always ready to handle requests. Always On is not available for Consumption plan functions. Increasing timeout does not reduce cold start time. The isolated worker model provides better process isolation but does not inherently reduce cold start times.
9You are developing a Durable Function orchestration that calls three activity functions in sequence. The second activity function might take up to 5 minutes to complete. How should you configure the function to handle this?
A.Set the functionTimeout in host.json to 10 minutes
B.Use an HTTP trigger instead of an activity trigger
C.Configure the orchestration to use the async pattern with status query
D.Implement the activity function as an entity function
Explanation: Activity functions can run for extended periods, and you need to configure the functionTimeout in host.json to accommodate the longest-running activity. For the Consumption plan, the default is 5 minutes (extendable to 10 minutes). For Premium and Dedicated plans, it can be set to longer durations. Using HTTP triggers would break the Durable Functions pattern. The async pattern is for external events, not long-running activities. Entity functions are for stateful entities, not long-running operations.
10You need to implement an Azure Function that processes files uploaded to Azure Blob Storage. The function must ensure exactly-once processing semantics. How should you implement this?
A.Use Event Grid trigger with idempotent processing logic
B.Use Blob trigger with poison blob handling enabled
C.Use Queue trigger with blob URL in the message
D.Use HTTP trigger called by Storage Events
Explanation: Event Grid triggers provide at-least-once delivery guarantees, so you need idempotent processing logic to ensure exactly-once semantics. This typically involves tracking processed blob IDs in a database or using blob metadata. Blob triggers have eventual consistency and can miss events or process duplicates. Queue triggers are reliable but still require idempotency logic. HTTP triggers also require idempotency handling.

About the Azure AZ-204 Exam

The AZ-204 exam validates skills in designing, building, testing, and maintaining cloud applications on Azure. It covers Azure compute solutions, storage, security, monitoring, and connecting to Azure services and third-party services.

Questions

50 scored questions

Time Limit

100 minutes

Passing Score

700/1000

Exam Fee

$165 (Microsoft / Pearson VUE)

Azure AZ-204 Exam Content Outline

25-30%

Azure Compute Solutions

App Service, Azure Functions, containers, Docker, ACI, AKS, and VM-based solutions

20-25%

Azure Security

Authentication, authorization, Azure AD, Managed Identity, Key Vault, and Secure App Configuration

15-20%

Azure Storage

Blob storage, Cosmos DB, Azure SQL, table storage, and caching solutions

15-20%

Monitoring & Optimization

Application Insights, Azure Monitor, caching, CDN, and transient fault handling

15-20%

Connecting to Services

API Management, Event Grid, Event Hubs, Service Bus, and Azure Queue Storage

How to Pass the Azure AZ-204 Exam

What You Need to Know

  • Passing score: 700/1000
  • Exam length: 50 questions
  • Time limit: 100 minutes
  • Exam fee: $165

Keys to Passing

  • Complete 500+ practice questions
  • Score 80%+ consistently before scheduling
  • Focus on highest-weighted sections
  • Use our AI tutor for tough concepts

Azure AZ-204 Study Tips from Top Performers

1Build hands-on projects using Azure App Service, Functions, and containers
2Master Azure AD authentication flows: OAuth 2.0, MSAL, and Managed Identity
3Practice with Cosmos DB consistency levels and partitioning strategies
4Know Azure storage access tiers, lifecycle management, and shared access signatures
5Study messaging services: Service Bus queues/topics, Event Grid, and Event Hubs differences
6Complete Microsoft Learn modules and practice with Azure free tier resources

Frequently Asked Questions

What is the AZ-204 pass rate?

The estimated pass rate is 65-70%. The exam requires 700/1000 to pass with approximately 50 questions in 100 minutes. Questions include multiple choice, case studies, and hands-on labs.

How hard is the AZ-204?

AZ-204 is considered moderately difficult. It requires hands-on coding experience with Azure SDKs, REST APIs, and Azure services. Strong knowledge of C# or Python and Azure development tools is essential.

How long should I study?

Most candidates study 6-10 weeks, investing 80-120 hours. Focus on hands-on labs and building applications on Azure. Practice with Azure SDKs and the Azure CLI.

Does AZ-204 have lab questions?

Yes, AZ-204 may include performance-based lab questions where you complete tasks in a live Azure environment. Practice with Azure portal, CLI, and SDKs before the exam.