You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/service-connector/includes/code-cosmosgremlin-me-id.md
+69-3Lines changed: 69 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ author: wchigit
3
3
description: managed identity, code sample
4
4
ms.service: service-connector
5
5
ms.topic: include
6
-
ms.date: 10/31/2023
6
+
ms.date: 12/04/2023
7
7
ms.author: wchi
8
8
---
9
9
@@ -204,13 +204,79 @@ ms.author: wchi
204
204
)
205
205
```
206
206
207
-
### [NodeJS](#tab/node)
207
+
### [Go](#tab/go)
208
+
1. Install dependencies.
209
+
```bash
210
+
go get github.com/Azure/azure-sdk-for-go/sdk/azidentity
211
+
go get github.com/go-gremlin/gremlin
212
+
```
213
+
214
+
1. In code, get the access token using `azidentity`, then use it to acquire the password. Get connection information from the environment variable added by Service Connector and connect to Azure Cosmos DB for Apache Gremlin. When using the code below, uncomment the part of the code snippet for the authentication type you want to use.
2. In code, get the access token using `@azure/identity`, then use it to acquire the password. Get connection information from the environment variable added by Service Connector and connect to Azure Cosmos DB for Apache Gremlin. When using the code below, uncomment the part of the code snippet for the authentication type you want to use.
279
+
1. In code, get the access token using `@azure/identity`, then use it to acquire the password. Get connection information from the environment variable added by Service Connector and connect to Azure Cosmos DB for Apache Gremlin. When using the code below, uncomment the part of the code snippet for the authentication type you want to use.
214
280
215
281
```javascript
216
282
import { DefaultAzureCredential,ClientSecretCredential } from "@azure/identity";
0 commit comments