Azure Intermediate Level
4,925 views

12 Sample Questions to help you crack the AZ-204 Developing Microsoft Solutions certification exam

A
Published on
7 min read 1,350 words
12 Sample Questions to help you crack the AZ-204 Developing Microsoft Solutions certification exam
Dev Knowledge • Hub

Earning the Microsoft Certified: Azure Developer Associate credential requires demonstrating hands-on expertise in designing, building, and maintaining cloud applications. The AZ-204 exam evaluates your ability to implement security, compute solutions, storage, integration services, and monitoring frameworks. This expert-curated guide provides twelve high-fidelity practice questions mapped directly to the latest exam syllabus, complete with detailed explanations to help you pass on your first attempt.

⚡ Key Takeaways

  • Understand modern Azure SDK paradigms (e.g., Azure.Storage.Blobs) over deprecated namespace conventions.
  • Master the configuration of Azure Cosmos DB consistency levels and how they impact performance and accuracy.
  • Learn to distinguish between different Shared Access Signature (SAS) types and key delegation methods.
  • Develop a strong familiarity with container-related commands, Dockerfiles, and Azure CLI resource deployments.

Understanding the AZ-204 Exam Blueprint

To pass the AZ-204 certification, you must demonstrate competence across five major domains: developing Azure compute solutions (25-30%), developing for Azure storage (15-20%), implementing Azure security (20-25%), monitoring, troubleshooting, and optimizing Azure solutions (15-20%), and connecting to and consuming Azure services and third-party services (15-20%). Because Microsoft updates the exam regularly, candidates must study using contemporary coding SDKs and up-to-date CLI commands rather than relying on legacy documentation.

AZ-204 Developing Microsoft Solutions Practice Quiz

Read through each question carefully, select your answers, and compare them with the comprehensive answer key and explanations provided below.

Question 1 (Azure Compute)

You need to deploy a containerized Docker application to an Azure App Service Web App. You are writing an automated Azure PowerShell script to provision the necessary infrastructure. Which three cmdlets must your script include? (Select 3 answers)

  • a) New-AzResourceGroup
  • b) New-AzAppServicePlan
  • c) Create-AzWebApp
  • d) New-AzWebApp

Question 2 (Serverless Solutions)

You are developing an Azure Function App. When reviewing the function.json metadata configuration file, you are evaluating the "direction" property of triggers and bindings. Which of the following statements regarding the "direction" property is correct?

  • a) For triggers, the direction is always "in".
  • b) Triggers can support both "in" and "out" directions.
  • c) Some specific input bindings support a "direction" value of "input".
  • d) Input and output bindings can use "in" and "out" direction values, respectively.

Question 3 (Azure Storage)

You are writing a .NET application to interact with Azure Blob Storage using the modern, officially recommended SDK. Which class provides the primary entry point to connect to your storage account and interact with containers?

  • a) BlobClient
  • b) BlobServiceClient
  • c) CloudBlobClient
  • d) BlobContainerClient

Question 4 (Cosmos DB)

You are designing an Azure Cosmos DB database. The architecture must normalize the cost of various database operations like reads, writes, and queries into a single, predictable metric. What is this standard unit of cost called?

  • a) Request Units (RU)
  • b) IOPS (Input/Output Operations Per Second)
  • c) Provisioned Throughput Metric (PTM)
  • d) Read Capacity Units (RCU)

Question 5 (Containers)

A developer is working with a local Docker development environment. To save disk space, they want to remove an unused Docker image named "temp-ubuntu" with the tag "version-1.0". Which command should they execute?

  • a) docker rm temp-ubuntu:version-1.0
  • b) docker rmi temp-ubuntu:version-1.0
  • c) docker image clear temp-ubuntu:version-1.0
  • d) docker purge temp-ubuntu:version-1.0

Question 6 (Azure Security)

You need to generate a Shared Access Signature (SAS) to grant safe access to specific storage resources. You want to align with Azure security best practices. Which of the following methods can be used to sign a SAS token? (Select 2 answers)

  • a) Using the primary storage account access key
  • b) Using a User Delegation Key generated with Azure AD credentials
  • c) Using a self-signed client certificate upload
  • d) Appending an HTTPS endpoint configuration

Question 7 (Event-Based Solutions)

You are writing a C# .NET console application designed to ingest real-time telemetry from multiple IoT devices. Which class from the modern Azure Event Hubs client library should you use to send a batch of events to an event hub?

  • a) EventHubClient
  • b) EventHubProducerClient
  • c) EventHubConsumerClient
  • d) TelemetrySenderClient

Question 8 (Storage Queues)

You are designing a distributed application that passes message payloads using Azure Queue Storage. By default, what is the maximum duration that a message can remain in an Azure storage queue if it is not processed?

  • a) 4 days
  • b) 7 days
  • c) 14 days
  • d) 30 days

Question 9 (Caching and Performance)

You are integrating Azure Cache for Redis into a .NET solution. To execute multiple commands atomically as a single logical unit of work, you want to write a Redis transaction. Which method on the IDatabase class should you call to create a transaction?

  • a) CreateBatch()
  • b) CreateTransaction()
  • c) CreateSingle()
  • d) BeginTransaction()

Question 10 (Access Control)

You need to configure custom access policies in Azure Active Directory (Azure AD). You are writing an Azure CLI script to define a custom role and then assign a specific user to that role. Which command pair should your script invoke sequentially?

  • a) az role assignment create followed by az role definition create
  • b) az role definition create followed by az role assignment create
  • c) az role definition create followed by az role assignment list
  • d) az role definition list followed by az role assignment create

Question 11 (Developer Tools)

You are writing a Dockerfile to package a .NET application. Which commands are valid, standard Dockerfile instructions? (Select all that apply)

  • a) FROM
  • b) WORKDIR
  • c) RUN
  • d) CMD

Question 12 (Cosmos DB Consistency)

You are developing an application that uses an Azure Cosmos DB NoSQL database. You need the application to return read data that is guaranteed to be current, or to lag behind writes by a configurable number of versions or a set time window. Which consistency level should you select?

  • a) Strong Consistency
  • b) Bounded Staleness Consistency
  • c) Session Consistency
  • d) Consistent Prefix Consistency

In-Depth Answer Key and Explanations

1. Correct Answers: a, b & d

Explanation: To deploy a web app in Azure via PowerShell, you must first create a resource group (New-AzResourceGroup), then provision an App Service Plan (New-AzAppServicePlan), and finally create the web app inside that plan (New-AzWebApp). The cmdlet Create-AzWebApp is not a valid PowerShell cmdlet in the Azure Az module.

2. Correct Answers: a, c & d

Explanation: In the Azure Functions metadata system, the direction property for all triggers is always "in" because they initiate execution. Input and output bindings use "in" and "out" values, respectively, and a few specific legacy binding mechanisms allow an "input" value. Triggers do not support an "out" direction as their purpose is only to deliver input events.

3. Correct Answer: b

Explanation: In the modern Azure.Storage.Blobs SDK, the primary entry point is the BlobServiceClient class, which allows you to manage container clients. The classes BlobClient and BlobContainerClient are used to interact with individual blobs and containers, respectively, while CloudBlobClient is part of the deprecated legacy SDK.

4. Correct Answer: a

Explanation: The cost of all database operations (reads, writes, updates, deletes, and queries) is normalized by Cosmos DB into Request Units (RUs). A single Request Unit represents the database throughput required to read a 1 KB document using its ID.

5. Correct Answer: b

Explanation: To remove a Docker image from your local system, you use the docker rmi command (which stands for "remove image"). The docker rm command is used to remove stopped containers, not images.

6. Correct Answers: a & b

Explanation: A Shared Access Signature (SAS) token can be signed using either the Storage Account Key (account SAS or service SAS) or a User Delegation Key generated with Azure AD credentials. User delegation is preferred as it avoids sharing the root account access key.

7. Correct Answer: b

Explanation: In the modern Azure.Messaging.EventHubs client library, EventHubProducerClient is the primary client designed to send batches of messages. EventHubConsumerClient is used to read/consume events, and EventHubClient is part of the older, legacy library.

8. Correct Answer: b

Explanation: The default maximum retention period for a message in Azure Queue Storage is 7 days. If a message is not retrieved and deleted by a worker within this timeframe, it is automatically purged by Azure.

9. Correct Answer: b

Explanation: In StackExchange.Redis, you execute transactional batches by calling the CreateTransaction() method on the IDatabase interface. This returns an ITransaction object which allows queueing commands that are processed atomically as a single unit.

10. Correct Answer: b

Explanation: To assign a user to a custom role using the Azure CLI, the role definition must exist first. Therefore, you must create the role definition using az role definition create before you can assign a user to it using az role assignment create.

11. Correct Answers: a, b, c & d

Explanation: All of the listed options are valid Dockerfile instructions: FROM specifies the parent base image, WORKDIR sets the working directory, RUN executes terminal commands during build, and CMD defines the default runtime executable command.

12. Correct Answer: b

Explanation: Bounded Staleness consistency guarantees that reads may lag behind writes by a configurable number of updates or a specific time window. Strong consistency ensures reads are immediately current but incurs higher latency and cost, failing the requirement for a "configurable lag".

Quick Comparison: Azure Compute Options for Developers

Feature Azure App Services Azure Functions (Serverless) Azure Container Instances (ACI)
Compute Model Dedicated / Shared Web Apps Event-driven Serverless On-demand Container Execution
Billing Unit App Service Plan pricing tier Per-second execution resource consumption Per-second CPU and memory usage
Cold Start No (Always On optional) Yes (unless using Premium/Dedicated) Minimal startup latency
Scaling Autoscale based on metric thresholds Instantaneous automatic scaling Manual deployment per container group

❓ Frequently Asked Questions

Is there a negative marking system in the AZ-204 exam?

No, there is no negative marking for incorrect answers on the AZ-204 certification exam. If a question requires selecting multiple options, you will receive partial credit for each correct option you select, so it is always beneficial to guess if you are unsure.

How many questions can I expect during the AZ-204 exam, and what is the time limit?

The exam typically contains between 40 and 60 questions, which can include multiple-choice, drag-and-drop, active screen, and scenario-based case studies. You are given a total of 120 minutes to complete the exam.

What passing score is required to clear the AZ-204 exam?

You must achieve a scaled score of at least 700 out of 1000 to pass the AZ-204 Developing Microsoft Solutions exam. Scaled scores are not direct percentages, meaning some questions may have different weightings depending on their difficulty.

How long does the AZ-204 Azure Developer Associate certification remain valid?

Like most Microsoft role-based certifications, the Azure Developer Associate credential is valid for exactly one year. You can renew it for free online via Microsoft Learn by passing a renewal assessment within six months of its expiration date.

🎯 Conclusion

Cracking the AZ-204 Developing Microsoft Solutions exam requires a balanced combination of theoretical cloud architecture knowledge and practical, hands-on programming experience. By mastering core concepts like container orchestration, storage client APIs, serverless bindings, and security mechanisms, you will be well-prepared to ace this rigorous test. Take advantage of high-quality training bootcamps, official study resources, and realistic practice quizzes to reinforce your training. Dedicate consistent time to build in Azure, and you will secure your certification with confidence!

Related Topics: AZ-204 study guide, Azure developer certification, Azure Cosmos DB consistency, Azure Functions bindings, BlobServiceClient class, az role assignment, Redis transactions, Dockerfile commands

A

Written By Akash Kumar

Senior Software Developer

Akash Kumar is a Senior Software Developer with 6+ years of experience as a full stack developer. He specializes in designing and building scalable web applications, optimizing cloud infrastructure, and implementing modern DevOps workflows.

Share & Support:

Frequently Asked Questions (FAQ)

Was this page helpful?

Let us know how we can improve this content.

Comments (0)