Cosmos DB
Database Accounts
Microsoft.DocumentDB/databaseAccounts
- Control plane
- Supported
- Data plane
- Emulated
- API versions
- 47 25 stable
- Ships in
- Plugin Microsoft.DocumentDB 2026.11
- Plan
- Standard and above
Data as of 2026-11-20
API versions
The API versions Locally supports for Microsoft.DocumentDB/databaseAccounts.
| API version | Status | Control plane | Data plane |
|---|---|---|---|
| 2026-07-15 | stable | Supported | Emulated |
| 2026-04-01-preview | preview | Supported | Emulated |
| 2026-03-15 | stable | Supported | Emulated |
| 2025-11-01-preview | preview | Supported | Emulated |
| 2025-10-15 | stable | Supported | Emulated |
| 2025-05-01-preview | preview | Supported | Emulated |
| 2025-04-15 | stable | Supported | Emulated |
| 2024-12-01-preview | preview | Supported | Emulated |
| 2024-11-15 | stable | Supported | Emulated |
| 2024-09-01-preview | preview | Supported | Emulated |
| 2024-08-15 | stable | Supported | Emulated |
| 2024-05-15-preview | preview | Supported | Emulated |
| 2024-05-15 | stable | Supported | Emulated |
| 2024-02-15-preview | preview | Supported | Emulated |
| 2023-11-15-preview | preview | Supported | Emulated |
| 2023-11-15 | stable | Supported | Emulated |
| 2023-09-15-preview | preview | Supported | Emulated |
| 2023-09-15 | stable | Supported | Emulated |
| 2023-04-15 | stable | Supported | Emulated |
| 2023-03-15-preview | preview | Supported | Emulated |
| 2023-03-15 | stable | Supported | Emulated |
| 2023-03-01-preview | preview | Supported | Emulated |
| 2022-11-15-preview | preview | Supported | Emulated |
| 2022-11-15 | stable | Supported | Emulated |
| 2022-08-15-preview | preview | Supported | Emulated |
| 2022-08-15 | stable | Supported | Emulated |
| 2022-05-15-preview | preview | Supported | Emulated |
| 2022-05-15 | stable | Supported | Emulated |
| 2022-02-15-preview | preview | Supported | Emulated |
| 2021-11-15-preview | preview | Supported | Emulated |
| 2021-10-15-preview | preview | Supported | Emulated |
| 2021-10-15 | stable | Supported | Emulated |
| 2021-07-01-preview | preview | Supported | Emulated |
| 2021-06-15 | stable | Supported | Emulated |
| 2021-05-15 | stable | Supported | Emulated |
| 2021-04-15 | stable | Supported | Emulated |
| 2021-04-01-preview | preview | Supported | Emulated |
| 2021-03-15 | stable | Supported | Emulated |
| 2021-03-01-preview | preview | Supported | Emulated |
| 2021-01-15 | stable | Supported | Emulated |
| 2020-09-01 | stable | Supported | Emulated |
| 2020-06-01-preview | preview | Supported | Emulated |
| 2020-04-01 | stable | Supported | Emulated |
| 2020-03-01 | stable | Supported | Emulated |
| 2019-12-12 | stable | Supported | Emulated |
| 2019-08-01-preview | preview | Supported | Emulated |
| 2019-08-01 | stable | Supported | Emulated |
Note: This is generated from the latest version of the plugin (2026.11) as of 2026-11-20, and may differ in older versions. We aim to keep this information accurate and up to date; if you find something we're missing, then please let us know.
Nested resource types
The resource types nested under Microsoft.DocumentDB/databaseAccounts. Click one to see more information.
Features
- NoSQL, MongoDB and Table APIs, each on its own endpoint for accounts which use them.
- Direct mode, the .NET SDK's default, as well as gateway mode.
- Regional endpoints for each of the account's locations, which the SDKs' preferred regions use.
- Primary and secondary keys, including read-only keys, which can only read.
- Disabling local authentication:
disableLocalAuthrefuses the account's keys, resource tokens and MongoDB credentials. - Key-based metadata writes can be blocked with
disableKeyBasedMetadataWriteAccess. - Microsoft Entra authentication, checked against the account's data plane role assignments.
- Resource tokens
- Default consistency level: a request can relax it but not strengthen it, and session tokens are issued.
- Serverless accounts with
EnableServerless, which refuse provisioned throughput. - Vector and full-text search capabilities:
EnableNoSQLVectorSearchandEnableNoSQLFullTextSearch. - MongoDB server version from
3.2to7.0, andmongodb+srv://connection strings. - Point-in-time restore into a new account with
restoreTimestampInUtc, optionally limited bydatabasesToRestoreandtablesToRestore. - Cosmos DB Explorer in the Locally Dashboard, to browse data, see Request Units used and rotate keys.
- Chaos Engineering for the SQL, MongoDB and Table APIs. Team
Limitations
Database Accounts
- A restore timestamp outside the backup retention window is currently accepted and will be fixed in a future release.
- Every region serves the same single copy of the data at this time, so every consistency level reads the latest write, and conflicts never happen.
- Gremlin and Cassandra accounts can be created, but there's no Gremlin or Cassandra endpoint behind them at this time.
- Restore only covers the NoSQL and Table APIs at this time, and
restoreLocationis ignored. - The restorable resource lists only include databases, containers and tables created through Azure Resource Manager at this time.
Cassandra Keyspaces
- Cassandra keyspaces can be created, but there's no Cassandra endpoint behind them at this time.
Collections
$setWindowFields,$bucket,$densify,$filland$unionWithare rejected, and$graphLookupneeds server version 4.0 or earlier.- Autoscale throughput can't be set through the extension commands at this time.
- MongoDB collections aren't covered by restore at this time.
- Stages after
$changeStreamare rejected at this time. - Tailable cursors aren't supported at this time.
- The pipeline form of
$lookupis rejected at this time.
Container Throughput Settings
- Autoscale throughput doesn't scale with load at this time.
- The 400 RU/s minimum for manual throughput isn't enforced at this time.
Containers
- A cross-partition query with an aggregate inside a larger expression, or with
ORDER BYandGROUP BYtogether, can return wrong results from the .NET SDK. - Custom analyzers in a full-text policy aren't supported at this time.
- Paging with a continuation token can skip or repeat items if the container is written to between pages at this time.
- Partitions don't split or merge at this time.
ST_AREAisn't supported, andST_WITHINandST_INTERSECTSuse planar geometry, so very large shapes can give different results.
Gremlin Databases
- Gremlin databases can be created, but there's no Gremlin endpoint behind them at this time.
MongoDB Databases
- Database-level throughput can't be set through the extension commands at this time.
- MongoDB databases aren't covered by restore at this time.
- Users can't be managed over the wire protocol at this time.
SQL Database Throughput Settings
- Autoscale throughput doesn't scale with load at this time.
- The 400 RU/s minimum for manual throughput isn't enforced at this time.
SQL Databases
- Restoring a deleted database brings back every container deleted with it at this time, even ones created after the restore timestamp.
Stored Procedures
- A query inside a stored procedure can't call a user-defined function at this time.
- Stored procedures have no execution time limit at this time, so
isAcceptedis always true.
Triggers
- Pre-triggers can't use
getCollection()at this time.
User Defined Functions
- A user-defined function can't be called from a query inside a stored procedure at this time.
Examples
Runnable examples from the examples library.
Deploying a Cosmos DB-backed app to App Service
Deploy a TypeScript Tasks app to App Service with Terraform, storing its data in Cosmos DB and connecting to it with a managed identity.
Deploy a Cosmos DB Account to Locally using an ARM Template
Provisions a Cosmos DB for NoSQL account using Session consistency, into a Resource Group of your choosing.
Deploy a Cosmos DB Account to Locally using a Bicep Template
Provisions a Cosmos DB for NoSQL account using Session consistency, into a Resource Group of your choosing.
Deploy a Cosmos DB Account to Locally using Terraform and the Azure/azapi provider
Provisions a Resource Group containing a Cosmos DB for NoSQL account using Session consistency.
Deploy a Cosmos DB Account to Locally using Terraform and the hashicorp/azurerm provider
Provisions a Resource Group containing a Cosmos DB for NoSQL account using Session consistency.
Deploy a Cosmos DB Account to Locally using OpenTofu and the Azure/azapi provider
Provisions a Resource Group containing a Cosmos DB for NoSQL account using Session consistency.
Deploy a Cosmos DB Account to Locally using OpenTofu and the opentofu/azurerm provider
Provisions a Resource Group containing a Cosmos DB for NoSQL account using Session consistency.