You are designing a multi-tenant SaaS application where each tenant's data must be isolated and queries must be highly efficient for per-tenant reads. The application will have thousands of tenants. Which Cosmos DB partition key design is most appropriate?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Use tenantId as the partition key to ensure all data for a tenant is co-located and queries are efficient within a single logical partition

For multi-tenant applications, using tenantId as the partition key ensures that all data belonging to a tenant resides in the same logical partition. This eliminates cross-partitio...

๐Ÿ“‹Part of Microsoft Certified: Azure Developer Associate (AZ-204) ยท Azure Certification Practice
Real Exam ScenarioAzure Cosmos DB

You are designing a multi-tenant SaaS application where each tenant's data must be isolated and queries must be highly efficient for per-tenant reads. The application will have thousands of tenants. Which Cosmos DB partition key design is most appropriate?

โœ“ Correct Answer & ExplanationAzure Cosmos DB

Correct Answer

Use tenantId as the partition key to ensure all data for a tenant is co-located and queries are efficient within a single logical partition

Why This Answer Is Correct

For multi-tenant applications, using tenantId as the partition key ensures that all data belonging to a tenant resides in the same logical partition. This eliminates cross-partition queries for tenant-specific operations, significantly reducing RU/s consumption and latency.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Azure Cosmos DB โ€” a core concept tested in Microsoft Certified: Azure Developer Associate (AZ-204). Understanding Azure Cosmos DB is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.