DP-420 Practice Test
Building AI Applications with Azure Cosmos DB
DP-420 tests whether you can build production Azure Cosmos DB applications for the AI era: partition key design, RU and throughput planning, change feed, security and multi-region availability, plus vector and hybrid search, RAG, and agent memory, not just NoSQL terminology.
Our 500 scenario-based questions follow the October 6, 2026 DP-420 skills outline across three domains: design and develop database solutions (resource models and SDK clients, consistency and throughput, queries and point operations, bulk and transactional batch, TTL and concurrency, data modeling and partition keys including hierarchical and synthetic keys, change feed modes, copy container jobs, and Agent Kit), secure, optimize, and deploy database solutions (Microsoft Entra ID and RBAC, network security, dynamic data masking, backup and restore, multi-region and failover, query and index performance, Azure Monitor and Log Analytics, and Fleets), and implement AI and analytics capabilities (full-text, vector, and hybrid search, vector indexes and sharded DiskANN, retrieval-augmented generation, agent memory stores, and Microsoft Fabric mirroring and analytics). Every question is grounded against live Microsoft Learn documentation.
Start Free Practice β 40 QuestionsNo credit card required. Upgrade to full 500 questions for $19.99 when ready.
Is this for you?
This is NOT for you if:
DP-420 Exam Details
What to expect on exam day
Questions
40
Duration
100 minutes
Passing Score
700
Exam Cost
$165
Exam Domains Covered
Master all topics tested on the DP-420 exam
Design and develop database solutions
Secure, optimize, and deploy database solutions
Implement AI and analytics capabilities in database solutions
Test Yourself Right Now
Try 5 real practice questions β no signup needed
5 Free DP-420 Questions
See how ready you are for the DP-420 exam. Each question includes a detailed explanation so you learn as you go.
Sample DP-420 Practice Questions
10 real questions from the free DP-420bank. Pick an answer in your head, then open βShow answerβ for the explanation.
1. In Azure Cosmos DB for NoSQL, what does setting a container's DefaultTimeToLive property to -1 mean?
- A. TTL is disabled on the container entirely
- B. TTL is enabled on the container, but items do not expire by default unless an item sets its own ttl value
- C. Items in the container expire after -1 seconds, treated as immediate expiration
- D. The container will delete itself after -1 days
Show answer
Correct answer: B
B is correct -- a DefaultTimeToLive of -1 turns TTL on with no default expiration, so items live forever unless they set their own item-level ttl. A describes a null/missing DefaultTimeToLive instead. C misinterprets -1 as a literal negative duration. D is not a real behavior.
2. A tenant container in a pooled fleetspace has one physical partition with 7,000 RU/s of dedicated throughput, and a traffic spike needs as much capacity as possible. The fleetspace pool has 300,000 RU/s available and default limits apply. What is the maximum total RU/s that this physical partition can consume during the spike?
- A. 7,000 RU/s, because pool RU/s become available once the container autoscale maximum is raised
- B. 10,000 RU/s, because dedicated plus pool consumption is capped per physical partition
- C. 12,000 RU/s, because each physical partition can add 5,000 RU/s from the pool to its dedicated RU/s
- D. 300,000 RU/s, because pool RU/s are shared at the fleetspace level and are not bound to a partition
Show answer
Correct answer: B
By default a physical partition can draw up to 5,000 extra RU/s from the pool, but its total dedicated plus pool consumption cannot exceed 10,000 RU/s, so the maximum is min(5,000 + 7,000, 10,000) = 10,000 RU/s. Pool RU/s are used automatically once dedicated RU/s are exceeded, without raising the autoscale maximum. Adding 5,000 to 7,000 ignores the 10,000 RU/s per-partition cap. Pool capacity is still subject to the standard physical partition limits, so the full pool cannot flow to one partition.
3. A SaaS application partitions its Users container by CompanyID and wants to guarantee that no two users within the same company share an email address, while still allowing the same email address to be reused across different companies. Which unique key design achieves this?
- A. Set /CompanyID as the unique key path
- B. Set /email as the partition key instead of /CompanyID
- C. Keep /CompanyID as the partition key and add /email as a unique key path, so uniqueness is enforced per logical partition
- D. Create a separate container per company and set /email as that container's partition key
Show answer
Correct answer: C
C is correct -- because unique keys are scoped to a logical partition, keeping CompanyID as the partition key and adding email as the unique key path enforces 'unique per company' exactly as required, while allowing the same email in a different company's partition. A would make CompanyID itself unique, which breaks having multiple users per company. B changes the partition strategy entirely and doesn't scope uniqueness per company. D is an unnecessarily complex architecture that isn't required to satisfy the stated requirement.
4. Before choosing a partition key and deciding whether to embed or reference related data in Azure Cosmos DB for NoSQL, why is it important to first identify the application's data access patterns?
- A. Because Cosmos DB requires access patterns to be registered before a container can be created
- B. Because containers with documented access patterns support the change feed
- C. Because the partition key and modeling choices should optimize for how the data will actually be read and written, not just how it is logically related
- D. Because access patterns determine the container's maximum RU/s automatically
Show answer
Correct answer: C
C is correct -- Microsoft's guidance is to design partitioning and embedding/referencing decisions around actual query and write patterns, since a technically valid model can still perform poorly if it doesn't match how the application reads and writes data. A, B, and D describe requirements or behaviors that don't exist in Cosmos DB.
5. A stock-trading application models a person's portfolio by referencing stock items rather than embedding their full details, since stock prices change frequently throughout the day. What is the main tradeoff of this referenced design compared to embedding?
- A. It makes the portfolio document larger as trades accumulate
- B. It requires the container to use hierarchical partition keys
- C. Reading a complete portfolio with current stock details requires multiple database requests instead of one
- D. It prevents the application from ever updating the stock item
Show answer
Correct answer: C
C is correct -- referencing trades read simplicity for write efficiency: displaying a portfolio now requires resolving each stock reference with an extra request, but a stock's price only needs to be updated in one place. A describes an embedding-related concern, not referencing. B is not a requirement of referencing. D is false -- referenced items can still be updated normally.
Show 5 more questions
6. What is the Azure Cosmos DB Agent Kit?
- A. A managed Azure service that hosts AI agents and stores their state in Azure Cosmos DB
- B. A Python SDK that stores conversation turns, summaries, and facts as agent memory
- C. An Azure portal feature that automatically tunes indexing policies for AI workloads
- D. An open-source collection of skills that helps AI coding assistants follow best practices
Show answer
Correct answer: D
The Azure Cosmos DB Agent Kit is an open-source collection of skills, built on the Agent Skills format, that helps AI coding assistants such as GitHub Copilot, Claude Code, and Gemini CLI follow Azure Cosmos DB best practices. It isn't a hosting service for agents or a portal tuning feature, and the Python SDK for storing turns, summaries, and facts describes the separate Agent Memory Toolkit.
7. You're about to run an offline container copy job in Azure Cosmos DB for NoSQL. What must you do before you start the job to avoid duplicate or missing data in the target container?
- A. Enable continuous backup on the source account
- B. Enable AllVersionsAndDeletes mode on the source account
- C. Stop operations on the source container by pausing clients
- D. Delete the target container so the job can create it
Show answer
Correct answer: C
For offline copy, you stop operations on the source container by pausing the application instances or clients before starting the job, because updates and deletes made after the job starts might not be captured. Continuous backup and all versions and deletes mode are prerequisites for online copy, not offline copy. The target container must already exist before you create the job; otherwise, job creation fails with an Owner resource doesn't exist error.
8. A container's dominant access pattern is looking up a single item by a unique identifier the application already knows, with very few range queries. Which partition key choice best matches this access pattern for a small, read-heavy container?
- A. A low-cardinality property like region, which has five possible values
- B. A synthetic key combining region and a random suffix
- C. A hierarchical partition key with three levels
- D. The item id itself, since it provides a wide range of values, balances RU consumption evenly, and enables efficient point reads when the id is known
Show answer
Correct answer: D
D is correct -- Microsoft Learn specifically recommends item ID as the partition key for small, read-heavy (or write-heavy) containers where point reads by ID dominate, since it evenly distributes data and supports efficient point reads. A risks hot, oversized partitions since only five values exist. B and C add unnecessary complexity for a workload that doesn't need them, since neither improves single-item point reads by a known id.
9. A container has DefaultTimeToLive set to 2592000 (30 days). One specific item in that container sets its own ttl property to -1. What happens to that item?
- A. It still expires after 30 days, because the container-level setting takes precedence over the item-level value
- B. The container-level TTL becomes disabled for other items once one item sets ttl to -1
- C. It never expires, because an item-level ttl of -1 overrides the container's default and marks that item as exempt from expiration
- D. It expires immediately, because -1 is invalid at the item level
Show answer
Correct answer: C
C is correct -- an item-level ttl value overrides the container's DefaultTimeToLive for that specific item, and -1 means that item does not expire even though the container default would otherwise expire items after 30 days. A misstates precedence -- item-level settings override the container default. B incorrectly generalizes one item's setting to the whole container. D misreads -1 as invalid.
10. A container's unique key policy needs to guarantee that the combination of firstName, lastName, and email is unique within each CompanyID partition. What are the documented limits on a container's unique key policy that this design must respect?
- A. A maximum of 16 unique key constraints, each using at most 10 paths
- B. A maximum of 16 total path values across the policy, with at most 10 unique key constraints
- C. Exactly one unique key constraint per container, using any number of paths
- D. A maximum of 3 paths per constraint and no limit on the number of constraints
Show answer
Correct answer: B
B is correct per Microsoft Learn: a unique key policy can use up to 16 total path values, and each container can have up to 10 unique key constraints. A inverts the two limits. C and D misstate the documented numbers.
DP-420 study resources
Why Practice with MSCertQuiz?
Microsoft Learn teaches concepts. We prepare you for the actual exam.
Deep coverage of the partition-key decisions the exam weights heaviest: cardinality and write distribution, hierarchical and synthetic keys, multi-tenant strategies, and partitioning anti-patterns
Dedicated AI retrieval and agent memory content: vector embedding and indexing policies, full-text and hybrid search, sharded DiskANN, RAG patterns, and conversation and semantic memory stores
Production operations most NoSQL question banks skip: consistency and RU tradeoffs, multi-region and failover configuration, backup and restore, Entra ID data-plane RBAC, dynamic data masking, and Fleets
Updated to the October 6, 2026 skills outline and verified against live Microsoft Learn documentation, so content stays accurate as Azure Cosmos DB features evolve
Not sure if you're ready for the DP-420 exam?
Take the free DP-420 Readiness Check βWhat Our Users Say
βI'd used Cosmos DB casually for a year but never really understood the math behind synthetic partition keys and cross-partition query cost until I worked through these questions. Passed on my first attempt.β
Victor N.
DP-420 Certified
βThe multi-region writes and conflict-resolution domain was way more detailed than I expected. Consistency-model tradeoffs and RU cost impact showed up almost exactly like the real exam.β
Ines Y.
Cloud Developer
βAs a backend developer who mostly writes queries, the change feed and Fabric Mirroring integration questions filled real gaps between what I knew and what the exam actually tests.β
TomΓ‘s W.
Passed DP-420 first try
Choose Your Plan
Start free, upgrade when you're ready to get serious
Free
Good for exploring the platform
- 40 practice questions
- Practice mode only
- Progress tracking
- No exam simulation mode
DP-420 Full Access
Best if your exam is in the next 2-4 weeks
- 500 practice questions
- Practice & Exam modes
- Detailed explanations
- Lifetime access
7-day money-back guarantee
Pro β All Certs
Best if you're planning multiple Microsoft exams
- ALL certifications included
- Unlimited questions
- New certs added free
- Cancel anytime
Save 30% vs buying individually
Your DP-420Exam Won't Wait
Candidates who complete at least 2 full mock exams pass at significantly higher rates than those who only study passively.
Don't risk $165 on the real exam without testing yourself first.
Start Free Practice NowNo credit card required β’ 40 free questions β’ Upgrade for $19.99 when ready
Official Microsoft Resources
Our practice questions are aligned with official Microsoft exam objectives. We recommend studying with Microsoft Learn first, then using MSCertQuiz to test your readiness.
View Official DP-420 Exam DetailsDP-420 Frequently Asked Questions
Everything you need to know about the DP-420 Cosmos DB AI Applications certification
What is DP-420?
How much does the DP-420 exam cost and how long is it?
What is the passing score for DP-420?
What topics are covered on DP-420?
How hard is DP-420?
How long should I study for DP-420?
What are the prerequisites for DP-420?
Who should take DP-420?
Also Preparing For
Candidates studying DP-420 often prepare for these certifications next.