1---
2name: azure-documentdb
3description: Expert knowledge for Azure DocumentDB development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when using DocumentDB search (BM25/vector), Data API, MongoDB compatibility, change streams, or cross-region replication, and other Azure DocumentDB related development tasks. Not for Azure Cosmos DB (use azure-cosmos-db), Azure Table Storage (use azure-table-storage), Azure SQL Database (use azure-sql-database), Azure SQL Managed Instance (use azure-sql-managed-instance).
4compatibility: Requires network access. Uses mcp_microsoftdocs:microsoft_docs_fetch or fetch_webpage to retrieve documentation.
5metadata:
6 generated_at: "2026-08-31"
7 generator: "docs2skills/1.0.0"
8---
9
10# Azure DocumentDB Skill
11
12This skill provides expert guidance for Azure DocumentDB. Covers troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. It combines local quick-reference content with remote documentation fetching capabilities.
13
14## How to Use This Skill
15
16> **IMPORTANT for Agent**: Use the **Category Index** below to locate relevant sections. For categories with line ranges (e.g., `L35-L120`), use `read_file` with the specified lines. For categories with file links (e.g., `[security.md](security.md)`), use `read_file` on the linked reference file
17
18> **IMPORTANT for Agent**: If `metadata.generated_at` is more than 3 months old, suggest the user pull the latest version from the repository. If `mcp_microsoftdocs` tools are not available, suggest the user install it: [Installation Guide](https://github.com/MicrosoftDocs/mcp/blob/main/README.md)
19
20This skill requires **network access** to fetch documentation content:
21- **Preferred**: Use `mcp_microsoftdocs:microsoft_docs_fetch` with query string `from=learn-agent-skill`. Returns Markdown.
22- **Fallback**: Use `fetch_webpage` with query string `from=learn-agent-skill&accept=text/markdown`. Returns Markdown.
23
24## Category Index
25
26| Category | Lines | Description |
27|----------|-------|-------------|
28| Troubleshooting | L37-L45 | Diagnosing and fixing DocumentDB issues: common errors, CMK encryption problems, query performance via explain(), connectivity, and replication troubleshooting. |
29| Best Practices | L46-L56 | Best practices for DocumentDB indexing and queries, safe index changes, and configuring cross-region replication and high availability for resilient, performant data access. |
30| Decision Making | L57-L72 | Guides for choosing between DocumentDB and MongoDB services, planning migrations, configuring cross-region failover, and selecting optimal vector search/index algorithms across languages. |
31| Architecture & Design Patterns | L73-L84 | Patterns for scaling, HA/DR, sharding, multi‑cloud setups, and building Go/TypeScript AI agents (including autonomous travel) on Azure DocumentDB. |
32| Limits & Quotas | L85-L98 | Limits, quotas, and configuration constraints for DocumentDB: compute/storage tiers, free tier caps, SSD performance, indexing/text index limits, document/batch sizes, diagnostics, and feature availability. |
33| Security | L99-L110 | Securing DocumentDB clusters: encryption at rest and with customer keys, firewall and public access controls, Private Link, Entra ID RBAC, native users/privileges, and security best practices. |
34| Configuration | L111-L131 | Configuring DocumentDB features: search (BM25, vector, fuzzy, phrase, geo), MongoDB compatibility, change streams, replication/scale, transactions, Data API, alerts, and monitoring. |
35| Integrations & Coding Patterns | L132-L157 | Patterns and code to connect apps and AI/RAG tools to Azure DocumentDB, including drivers, HTTPS Data API, migrations (Mongo/Cassandra), vector search, and sample app integrations. |
36| Deployment | L158-L164 | Guides for deploying and managing DocumentDB clusters: local dev to Azure, backup/restore, version upgrades, and IaC deployment with Bicep and Terraform. |
37
38### Troubleshooting
39| Topic | URL |
40|-------|-----|
41| Troubleshoot common Azure DocumentDB issues | https://learn.microsoft.com/en-us/azure/documentdb/faq |
42| Troubleshoot CMK encryption issues in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-database-encryption-troubleshoot |
43| Diagnose query performance using explain() in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-read-explain-output |
44| Troubleshoot common Azure DocumentDB errors and connectivity | https://learn.microsoft.com/en-us/azure/documentdb/troubleshoot-common-issues |
45| Troubleshoot Azure DocumentDB replication issues | https://learn.microsoft.com/en-us/azure/documentdb/troubleshoot-replication |
46
47### Best Practices
48| Topic | URL |
49|-------|-----|
50| Use background indexing safely in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/background-indexing |
51| Apply cross-region replication best practices in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/cross-region-replication |
52| Implement HA and replication best practices in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/high-availability-replication-best-practices |
53| Apply indexing best practices for Azure DocumentDB collections | https://learn.microsoft.com/en-us/azure/documentdb/how-to-create-indexes |
54| Explore practical indexing scenarios in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-index |
55| Safely migrate from non-ordered to ordered indexes in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-migrate-ordered-indexes |
56| Optimize Azure DocumentDB queries with Index Advisor | https://learn.microsoft.com/en-us/azure/documentdb/index-advisor |
57
58### Decision Making
59| Topic | URL |
60|-------|-----|
61| Choose Azure first-party services for MongoDB workloads | https://learn.microsoft.com/en-us/azure/documentdb/azure-mongo-first-party |
62| Decide between Azure DocumentDB and MongoDB Atlas | https://learn.microsoft.com/en-us/azure/documentdb/compare-mongodb-atlas |
63| Choose cross-region failover modes in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/failover-modes |
64| Assess MongoDB readiness and plan migration to DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-assess-plan-migration-readiness |
65| Evaluate MongoDB compatibility in managed services | https://learn.microsoft.com/en-us/azure/documentdb/managed-service-compatibility |
66| Choose migration options from MongoDB to Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/migration-options |
67| Choose migration options from MongoDB to Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/migration-options |
68| Evaluate vector search algorithms with .NET | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-dotnet-select-algorithm |
69| Compare vector index options in Go on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-go-select-algorithm |
70| Test and select vector indexes with Java | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-java-select-algorithm |
71| Choose vector index algorithms using TypeScript | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-nodejs-select-algorithm |
72| Select optimal vector index and similarity in Python | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-python-select-algorithm |
73
74### Architecture & Design Patterns
75| Topic | URL |
76|-------|-----|
77| Apply autoscale behavior for Azure DocumentDB workloads | https://learn.microsoft.com/en-us/azure/documentdb/autoscale |
78| Understand HA and DR internals for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/availability-disaster-recovery-under-hood |
79| Plan high availability for Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/high-availability |
80| Design multi-cloud architectures with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/multi-cloud |
81| Design sharding strategy for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/partitioning |
82| Implement Go-based AI agents with DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-agent-go |
83| Build TypeScript AI agents with DocumentDB vector search | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-agent-nodejs |
84| Design an autonomous travel agent with DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/tutorial-ai-agent |
85
86### Limits & Quotas
87| Topic | URL |
88|-------|-----|
89| Use supported compute and storage configurations in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/compute-storage |
90| Use supported compute and storage configurations in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/compute-storage |
91| Understand Azure DocumentDB Free Tier limits and features | https://learn.microsoft.com/en-us/azure/documentdb/free-tier |
92| Configure Premium SSD v2 performance for DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/high-performance-storage |
93| Configure text indexes and understand their limits in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-create-text-index |
94| Enable diagnostic logs for Azure DocumentDB with tier constraints | https://learn.microsoft.com/en-us/azure/documentdb/how-to-monitor-diagnostics-logs |
95| Understand indexing behavior and limits in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/indexing |
96| Reference service limits and quotas for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/limitations |
97| Document size and batch write limits in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/max-document-size |
98| Track Azure DocumentDB feature releases and previews | https://learn.microsoft.com/en-us/azure/documentdb/release-notes |
99
100### Security
101| Topic | URL |
102|-------|-----|
103| Understand encryption at rest for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/database-encryption-at-rest |
104| Configure Azure DocumentDB firewall access rules | https://learn.microsoft.com/en-us/azure/documentdb/how-to-configure-firewall |
105| Configure Entra ID RBAC authentication for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-connect-role-based-access-control |
106| Configure customer-managed encryption keys for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-data-encryption |
107| Secure Azure DocumentDB with Azure Private Link | https://learn.microsoft.com/en-us/azure/documentdb/how-to-private-link |
108| Manage public network access to Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/how-to-public-access |
109| Manage secondary native users and privileges in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/secondary-users |
110| Apply security best practices to Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/security |
111
112### Configuration
113| Topic | URL |
114|-------|-----|
115| Configure and use change streams in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/change-streams |
116| Configure MongoDB feature compatibility in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/compatibility-features |
117| Use MongoDB query language features on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/compatibility-query-language |
118| Configure fuzzy full-text search in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-fuzzy |
119| Configure hybrid BM25 and vector search on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-hybrid |
120| Set up BM25 keyword search indexes on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-keyword |
121| Configure full-text search in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-overview |
122| Implement phrase and proximity search on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/full-text-search-phrase-proximity |
123| Configure and run geospatial queries in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/geospatial-support |
124| Configure wildcard indexes for dynamic schemas in DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-create-wildcard-indexes |
125| Create and use replica clusters in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-cross-region-replica-portal |
126| Configure metric-based alerts for Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-manage-alerts |
127| Scale and configure Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/how-to-scale-cluster |
128| Configure multi-operation transactions in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/how-to-transactions |
129| Configure and use the Azure DocumentDB MCP Toolkit | https://learn.microsoft.com/en-us/azure/documentdb/mcp-toolkit |
130| Monitor Azure DocumentDB metrics and resource usage | https://learn.microsoft.com/en-us/azure/documentdb/monitor-metrics |
131| Configure integrated vector store in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/vector-search |
132
133### Integrations & Coding Patterns
134| Topic | URL |
135|-------|-----|
136| Use LangChain Azure AI vector store with DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/build-rag-applications |
137| Integrate Haystack RAG pipelines with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/build-rag-pipelines |
138| Convert Cassandra schemas to Azure DocumentDB with VS Code | https://learn.microsoft.com/en-us/azure/documentdb/cassandra-how-to-schema-conversion-vs-code |
139| Use Azure DocumentDB Data API over HTTPS | https://learn.microsoft.com/en-us/azure/documentdb/data-api |
140| Connect Azure Databricks to Azure DocumentDB with Spark | https://learn.microsoft.com/en-us/azure/documentdb/how-to-connect-from-databricks |
141| Migrate MongoDB to DocumentDB using native tools | https://learn.microsoft.com/en-us/azure/documentdb/how-to-migrate-native-tools |
142| Migrate MongoDB using Azure DocumentDB VS Code extension | https://learn.microsoft.com/en-us/azure/documentdb/how-to-migrate-vs-code-extension |
143| Persist LangGraph agent state in Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/persist-agent-state |
144| Integrate LlamaIndex vector store with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/query-knowledge-base |
145| Integrate .NET/C# apps with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-dotnet |
146| Perform vector search with .NET on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-dotnet-vector-search |
147| Use Go drivers with Azure DocumentDB clusters | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-go |
148| Implement vector search in Go on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-go-vector-search |
149| Connect Java applications to Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-java |
150| Use Java for vector search on Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-java-vector-search |
151| Use Node.js drivers with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-nodejs |
152| Use Node.js for vector search on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-nodejs-vector-search |
153| Connect Python applications to Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-python |
154| Implement vector search in Python on DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-python-vector-search |
155| Integrate Rust applications with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-rust |
156| Generate AI advertisements using DocumentDB and OpenAI | https://learn.microsoft.com/en-us/azure/documentdb/tutorial-ai-advertisement-generation |
157| Build a MERN web app with Azure DocumentDB | https://learn.microsoft.com/en-us/azure/documentdb/tutorial-nodejs-web-app |
158
159### Deployment
160| Topic | URL |
161|-------|-----|
162| Develop locally with DocumentDB and deploy to Azure | https://learn.microsoft.com/en-us/azure/documentdb/development-loop |
163| Upgrade Azure DocumentDB clusters to newer MongoDB versions | https://learn.microsoft.com/en-us/azure/documentdb/how-to-upgrade-cluster |
164| Deploy Azure DocumentDB clusters with Bicep | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-bicep |
165| Deploy Azure DocumentDB clusters using Terraform | https://learn.microsoft.com/en-us/azure/documentdb/quickstart-terraform |