Skip to content

Commit a075d26

Browse files
authored
Merge branch 'MicrosoftDocs:main' into main
2 parents 7a5e561 + db4f3a6 commit a075d26

35 files changed

Lines changed: 1019 additions & 988 deletions

File tree

.openpublishing.publish.config.json

Lines changed: 274 additions & 268 deletions
Large diffs are not rendered by default.

articles/dms/includes/database-migration-service-offline-online.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
author: douglaslMS
3-
ms.author: douglasl
4-
ms.reviewer: randolphwest
2+
author: rwestMSFT
3+
ms.author: randolphwest
54
ms.date: 09/18/2024
65
ms.service: sql-database
76
ms.topic: include

articles/documentdb/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
href: quickstart-dotnet-vector-search.md
2525
- name: Create AI vector search app with Go
2626
href: quickstart-go-vector-search.md
27+
- name: Create AI agent with vector search in Go
28+
href: quickstart-agent-go.md
2729
- name: Develop a Python console application
2830
href: quickstart-python.md
2931
- name: Develop a TypeScript console application

articles/documentdb/how-to-connect-role-based-access-control.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Configure Microsoft Entra ID–based role-based access control (rol
44
author: seesharprun
55
ms.author: sidandrews
66
ms.topic: how-to
7-
ms.date: 01/02/2026
7+
ms.date: 02/04/2026
88
ms.devlang: python
99
defaultDevLang: python
1010
dev_langs:
@@ -27,7 +27,7 @@ Role-based access control provides a centralized mechanism to assign and enforce
2727
Enable Microsoft Entra ID to allow Microsoft Entra principals (users, service principals, or managed identities) to authenticate to the cluster. Microsoft Entra ID authentication is implemented using OpenID Connect (OIDC). Clients present an Entra-issued OIDC access token to the MongoDB driver. A cluster must have native authentication enabled; the supported configurations are native-only or Microsoft Entra ID authentication only or native and Microsoft Entra ID authentication.
2828

2929
> [!NOTE]
30-
> You can enable or change authentication methods on a cluster at any time after provisioning. Changing authentication methods does **not** require a cluster restart and is non-disruptive. When a cluster is created, native DocumentDB authentication must be enabled. You can disable native authentication after the cluster is finished provisioning.
30+
> You can enable or change authentication methods on a cluster at any time after provisioning. Changing authentication methods does **not** require a cluster restart and is nondisruptive. When a cluster is created, native DocumentDB authentication must be enabled. You can disable native authentication after the cluster is finished provisioning.
3131
3232
Benefits of using Microsoft Entra ID for authentication include:
3333

@@ -809,7 +809,7 @@ When you create an Azure DocumentDB cluster, the cluster is configured to solely
809809
810810
## Manage DocumentDB administrative Microsoft Entra ID identities and native users
811811
812-
When Microsoft Entra ID authentication is enabled on an Azure DocumetnDB cluster, you can add one or more Microsoft Entra ID principals as *administrator users* to that cluster. The Microsoft Entra ID administrator can be a Microsoft Entra ID user, a service principal, or a managed identity. Multiple Microsoft Entra ID administrators can be configured at any time.
812+
When Microsoft Entra ID authentication is enabled on an Azure DocumentDB cluster, you can add one or more Microsoft Entra ID principals as *administrator users* to that cluster. The Microsoft Entra ID administrator can be a Microsoft Entra ID user, a service principal, or a managed identity. Multiple Microsoft Entra ID administrators can be configured at any time.
813813
814814
Administrative Entra ID users are created as Azure entities under `Microsoft.DocumentDB/mongoClusters/users` and are replicated to the database.
815815
@@ -1212,26 +1212,12 @@ The `tls` setting must also be enabled. The remaining recommended settings are b
12121212
12131213
::: zone-end
12141214
1215-
## Connect using Microsoft Entra ID in MongoDB Shell
1216-
1217-
Use a client device with the [MongoDB Shell](https://www.mongodb.com/try/download/shell) installed to connect to your Azure DocumentDB cluster using a Microsoft Entra ID identity.
1218-
1219-
1. Open a terminal on a client with MongoDB shell installed.
1220-
1221-
1. Get the **name** of your Azure DocumentDB cluster and the **client ID** for the target identity.
1222-
1223-
1. Connect by using the following connection string:
1224-
1225-
```console
1226-
mongosh "mongodb+srv://<client-id>@<cluster-name>.global.mongocluster.cosmos.azure.com/?tls=true&authMechanism=MONGODB-OIDC&retrywrites=false&maxIdleTimeMS=120000"
1227-
```
1228-
12291215
## Connect using Microsoft Entra ID in Visual Studio Code
12301216
12311217
Use Visual Studio Code with the [DocumentDB extension](https://github.com/microsoft/vscode-documentdb) to connect to your Azure DocumentDB cluster using a Microsoft Entra ID identity.
12321218
12331219
> [!IMPORTANT]
1234-
> When you authenticate to an Azure DocumentDB cluster using Microsoft Entra ID in Visual Studio Code with DocumentDB extension, `shell` functionality isn't supported. If you need to use MongoDB shell with Microsoft Entra ID authentication, use [MongoDB Shell directly on a client machine](#connect-using-microsoft-entra-id-in-mongodb-shell).
1220+
> When you authenticate to an Azure DocumentDB cluster using Microsoft Entra ID in Visual Studio Code with DocumentDB extension, `shell` functionality isn't supported. If you need to use MongoDB shell with Microsoft Entra ID authentication, use [MongoDB Shell directly on a client machine](#connect-using-microsoft-entra-id-in-mongodb-compass-or-mongodb-shell).
12351221
12361222
1. Open Visual Studio Code.
12371223
@@ -1254,33 +1240,39 @@ Use Visual Studio Code with the [DocumentDB extension](https://github.com/micros
12541240
12551241
1. Wait for the connection to finalize. A new DocumentDB entry is then added to the **Connections** section for the cluster.
12561242
1257-
## Connect using Microsoft Entra ID in MongoDB Compass
1243+
## Connect using Microsoft Entra ID in MongoDB Compass or MongoDB Shell
1244+
1245+
Connect to your Azure DocumentDB cluster using a Microsoft Entra ID identity directly with the [MongoDB Compass](https://www.mongodb.com/products/tools/compass) application.
12581246
1259-
Connect to your Azure DocumentDB cluster using a Microsoft Entra ID identity directly with the [MongoDB Compass](https://www.mongodb.com/products/tools/compass) application.
1247+
1. Set up an execution environment for connecting to the Azure DocumentDB cluster by creating an Azure compute resource, like an Azure Virtual Machine.
12601248
1261-
1. Start the MongoDB Compass application.
1249+
1. Create either a system-assigned managed identity or a [user-assigned managed identity](/entra/identity/managed-identities-azure-resources/manage-user-assigned-managed-identities-azure-portal), and associate it with the virtual machine.
12621250
1263-
1. Select **+** in the **Connections** menu to add a new connection.
1251+
:::image source="media/how-to-connect-role-based-access-control/assign-managed-identity.png" alt-text="Screenshot to assign managed identity on the Azure portal.":::
12641252
1265-
1. Toggle the **Edit Connection String** setting to enable in the **New Connection** dialog.
1253+
1. Register the managed identity in the Azure DocumentDB Cluster.
12661254
1267-
1. Enter the following connection string into the **URI** input box.
1255+
:::image source="media/how-to-configure-entra-authentication/open-side-panel-to-add-entra-id-users.png" alt-text="Screenshot to register managed identity on the Azure DocumentDB Cluster.":::
1256+
1257+
1. Start the [MongoDB Compass](https://www.mongodb.com/products/tools/compass) application or [Mongo shell](https://www.mongodb.com/try/download/shell) in terminal.
1258+
1259+
1. Within MongoDB Compass, Select **+** in the **Connections** menu to add a new connection. While using the shell, get the **name** of your Azure DocumentDB cluster and the **client ID** for the target identity.
1260+
1261+
:::image source="media/how-to-connect-role-based-access-control/review-client-id.png" alt-text="Screenshot to review clientid needed for constructing the Entra connection string from portal on the Azure DocumentDB.":::
1262+
1263+
1. Enter the following credential into the **URI** input box.
12681264
12691265
```
12701266
mongodb+srv://<client-id>@<cluster-name>.global.mongocluster.cosmos.azure.com/?tls=true&authMechanism=MONGODB-OIDC&retrywrites=false&maxIdleTimeMS=120000&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:https://ossrdbms-aad.database.windows.net
12711267
```
12721268
1273-
1. Now, open the **Advanced Connection Options** dialog.
1269+
1. Open the **Advanced Connection Options** dialog.
12741270
12751271
1. In the **General** section, select `mongodb+srv` for the **Connection String Scheme**.
12761272
1277-
1. Next, navigate to the **Authentication** section.
1273+
1. Navigate to the **Authentication** section and ensure that the **OIDC** option is selected.
12781274
1279-
1. Ensure that the **OIDC** option is selected.
1280-
1281-
1. Now, navigate to the **OIDC Options** section.
1282-
1283-
1. Ensure that the **Consider Target Endpoint Trusted** option is also selected.
1275+
1. Navigate to the **OIDC Options** section and then ensure that the **Consider Target Endpoint Trusted** option is also selected.
12841276
12851277
1. Select **Save & Connect**.
12861278
@@ -1289,9 +1281,12 @@ Connect to your Azure DocumentDB cluster using a Microsoft Entra ID identity dir
12891281
Sign in to the cluster with an administrative Microsoft Entra ID identity to perform management operations for nonadministrative Microsoft Entra ID identities.
12901282
12911283
> [!NOTE]
1292-
> All management commands for nonadministrative users are supported for `SecurityPrincipal` and `user` principal types.
1284+
> All management commands for nonadministrative users are supported for `securityPrincipal` and `user` principal types.
1285+
>
1286+
> Nonadministrative users aren't registered in the Azure portal.
1287+
>
12931288
1294-
1. Sign in to the cluster using an administrative Microsoft Entra ID identity and using a tool like [MongoDB Shell](#connect-using-microsoft-entra-id-in-mongodb-shell).
1289+
1. Sign in to the cluster using an administrative Microsoft Entra ID identity and using a tool like [MongoDB Shell](#connect-using-microsoft-entra-id-in-mongodb-compass-or-mongodb-shell).
12951290
12961291
1. Add a nonadministrative Microsoft Entra ID identity with **read-write** permissions on the cluster using the `createUser` command:
12971292
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
ms.topic: include
3+
ms.date: 10/13/2025
4+
---
5+
6+
[!INCLUDE[Prerequisites - Azure subscription](prerequisite-azure-subscription.md)]
7+
8+
- An existing Azure DocumentDB cluster
9+
10+
- If you don't have a cluster, create a [new cluster](../quickstart-portal.md)
11+
12+
- [Role Based Access Control (RBAC) enabled](../how-to-connect-role-based-access-control.md#enable-microsoft-entra-id-authentication)
13+
14+
- [Firewall configured to allow access to your client IP address](../how-to-configure-firewall.md#grant-access-from-your-ip-address)
15+
16+
- [Azure OpenAI resource](/azure/ai-foundry/openai/how-to/create-resource?view=foundry-classic&pivots=cli#create-a-resource)
17+
18+
- Custom domain configured
19+
20+
- [Role Based Access Control (RBAC) enabled](/azure/developer/ai/keyless-connections)
21+
22+
- `text-embedding-3-small` model deployed
23+
24+
25+
- [Visual Studio Code](https://code.visualstudio.com/download)
26+
27+
- [DocumentDB extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-documentdb)
28+
29+
[!INCLUDE[External - Azure CLI prerequisites](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]

articles/documentdb/limitations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ The [Microsoft Entra ID authentication](./how-to-connect-role-based-access-contr
204204
- This feature doesn't support Microsoft Entra ID groups.
205205

206206
- When native DocumentDB authentication method is disabled, MongoDB Shell isn't supported in the Azure portal's **Quick start**.
207-
- You can [use MongoDB Shell with Microsoft Entra ID authentication](./how-to-connect-role-based-access-control.md#connect-using-microsoft-entra-id-in-mongodb-shell) outside of the Azure portal.
207+
- You can [use MongoDB Shell with Microsoft Entra ID authentication](./how-to-connect-role-based-access-control.md#connect-using-microsoft-entra-id-in-mongodb-compass-or-mongodb-shell) outside of the Azure portal.
208208

209209
### Native DocumentDB secondary users
210210

175 KB
Loading
135 KB
Loading
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
%% STEPS TO GENERATE IMAGE
2+
%% =======================
3+
%% 1. Install mermaid CLI v10.9.1 (see https://github.com/mermaid-js/mermaid-cli/blob/master/README.md):
4+
%% npm i -g @mermaid-js/mermaid-cli@10.9.1
5+
%% 2. Run command: mmdc -i agent-architecture-go.mmd -o ./agent-architecture-go.svg
6+
7+
flowchart TB
8+
subgraph Planner["Planner agent (gpt-4o-mini)"]
9+
P1[Refine user query]
10+
P2[OpenAI function calling]
11+
P3[Return structured data<br/>with similarity scores]
12+
end
13+
14+
subgraph Tool["Vector search tool"]
15+
T1[Generate embeddings<br/>text-embedding-3-small]
16+
T2[Execute MongoDB vector search<br/>cosine similarity]
17+
T3[Format results]
18+
end
19+
20+
subgraph Synthesizer["Synthesizer agent (gpt-4o)"]
21+
S1[Analyze top 3 results<br/>comparatively]
22+
S2[Generate natural language<br/>recommendations]
23+
S3[Explain tradeoffs<br/>between options]
24+
end
25+
26+
P1 --> P2 --> T1 --> T2 --> T3 --> P3 --> Synthesizer
27+
S1 --> S2 --> S3

articles/documentdb/media/quickstart-agent-go/agent-architecture-go.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)