This is the free Microsoft DP-420 practice question bank —
90 of 177 total questions, each with a full explanation, free to
read with no signup required. Updated 2026-10-03.
Every answer is verified against official Microsoft documentation —
see our methodology.
Question 1
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL database named DB1.
You develop a software as a service (SaaS) app named App1 that uses DB1. App1 will be used by multiple vendors to manage their customers.
You need to create a container in DB1 that will store customer and order details for each vendor. The solution must meet the following requirements:
• Each vendor must have a unique tenant ID.
• The performance of the container must be optimized for reads.
• Customer IDs can be duplicated across the container but must be unique for each vendor.
• The container must be optimized for concurrent queries from multiple customers. Each query will return data for a single vendor.
How should you configure the container?
A. Add a partition key to the tenant ID and a unique key policy to the customer ID.
B. Add hierarchical partition key on (tenant identifier, customer identifier).
C. Add a partition key to the customer ID and a unique key policy to the tenant ID.
D. Add hierarchical partition key on (customer identifier, tenant identifier).
Show Answer
Correct Answer: A
Explanation: Use the tenant ID as the partition key so each vendor’s queries target its own partition, supporting efficient and concurrent vendor-specific reads. A unique key policy on the customer ID enforces uniqueness within each logical partition, while allowing the same customer ID in different vendors’ partitions.
Question 2
You have an on-premises computer named Computer1 that runs Windows 11.
On Computer1, you install the Azure Cosmos DB Emulator by using the default settings.
You need to connect to the API for NoSQL clients hosted by the emulator.
What should you use?
A. Computer1 and the credentials used when installing the emulator
B. localhost:443 and the built-in Administrator user account credentials
C. Computer1 and a randomly-generated key
D. localhost:8081 and a well-known key
Show Answer
Correct Answer: D
Explanation: The Azure Cosmos DB Emulator uses the local endpoint https://localhost:8081 by default and authenticates clients with its well-known emulator key.
Question 3
HOTSPOT
You have an Azure Cosmos DB for NoSQL database that hosts a container named Container1.
You are evaluating whether to implement Always Encrypted for Container1.
How will the JSON components of the data in Container1 be affected by implementing Always Encrypted? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: Leaf values: Encrypted
Intermediate sub-property names: In plain text
Explanation: Always Encrypted encrypts the values at configured JSON paths, while the intermediate property names remain readable.
Question 4
HOTSPOT
You have an Azure Cosmos DB for NoSQL account that hosts a container named Container1. The items in Container1 are stored in the following format.
You need to write a query to return the Given and Family names of the children in Family1.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: JOIN c IN f.children
WHERE f.id = 'Family1'
Explanation: The JOIN iterates over the children array, and the WHERE clause selects the item whose id is Family1.
Question 5
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account named account1.
You plan to configure the Apache Kafka service as a data source for account1.
What should you use to store the Kafka configuration?
A. Apache Gremlin
B. Apache ZooKeeper
C. Apache Tomcat
D. Azure Key Vault
Show Answer
Correct Answer: B
Explanation: Apache ZooKeeper is used to store and manage Apache Kafka cluster metadata and configuration.
Question 6
You have an Azure Cosmos DB for NoSQL account that contains a database named DB1.
Users run the following query against DB1.
SELECT *
FROM c
WHERE c.bikeParts = "Frame, Chain, Peddles"
ORDER BY c.bikeParts ASC
You add an index to the recordset.
You need to change the ORDER BY syntax of the query to optimize the use of the index. The solution must NOT change the result set.
Which syntax should you use?
A. ORDER BY c._ts ASC, c.bikeParts DESC
B. ORDER BY c._ts DESC, c.bikeParts ASC
C. ORDER BY c.bikeParts ASC, c._ts ASC
D. ORDER BY c.bikeParts DESC, c._ts ASC
Show Answer
Correct Answer: C
Explanation: Use `ORDER BY c.bikeParts ASC, c._ts ASC`. This preserves the original ascending order on `bikeParts` and adds `_ts` as a secondary sort key, allowing a matching composite index to support the ordering. Since the filter fixes `bikeParts` to one value, the added key only orders documents within that matching group.
Question 7
You have an Azure subscription. The subscription contains an Azure Cosmos DB for NoSQL account named account1 that uses strong consistency and is deployed to the East US, West US, and Central US Azure regions.
The round-trip time (RTT) between the regions is shown in the following table.
Which write latency should you estimate for write requests against account1?
A. 150 ms
B. 232 ms
C. 282 ms
D. 572 ms
Show Answer
Correct Answer: C
Explanation: With strong consistency, estimate write latency as approximately twice the RTT between the farthest regions, plus about 10 ms of processing overhead. Using the 136 ms RTT gives 2 × 136 + 10 = 282 ms.
Question 8
HOTSPOT
You have an Azure subscription that contains the resources shown in the following table.
You need to query Container1 from the serverless SQL pool of workspace1.
How should you complete the query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: FROM: OPENROWSET(
After SERVER_CREDENTIAL: ) WITH
Explanation: OPENROWSET queries the Cosmos DB container, and WITH defines the columns returned.
Question 9
HOTSPOT
You have an Azure Cosmos DB for NoSQL account that contains a container named Container1.
You add a composite index to the default indexing policy of Container1. The index has the following definition.
firstName ASC, age ASC
You plan to execute the following query against Container1.
SELECT *
FROM C
WHERE c.firstName = "John"
AND c.age > 21
AND c._ts < 1612213196
You need to optimize the performance of the query by adding an additional index.
How should you complete the additional index? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: First component: firstName ASC
Second component: _ts DESC
Explanation: The existing index covers the firstName equality filter and the age range filter. Adding an index that starts with firstName and then includes _ts supports the equality filter and the timestamp range filter.
Question 10
HOTSPOT
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account. The account hosts a container named Container1.
Items are stored in Container1 in the following format.
You need to query name, sizeInGb, and currentStockLevel for items that have a value of currentStockLevel that is greater than 100.
How should you complete the query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: First blank: JOIN
Second blank: IN
Explanation: JOIN ao IN d.availableOptions expands the array into individual options. The WHERE clause then keeps only options whose currentStockLevel exceeds 100.
$19
Get all 177 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.