Skip to content

Commit 90f5735

Browse files
author
Arvind Krishnaa Jagannathan
committed
Finish up the docs
1 parent 86f7bfa commit 90f5735

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

articles/search/search-howto-index-cosmosdb.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,15 @@ Avoid port numbers in the endpoint URL. If you include the port number, the conn
149149
|`{ "connectionString" : "AccountEndpoint=https://<Cosmos DB account name>.documents.azure.com;AccountKey=<Cosmos DB auth key>;Database=<Cosmos DB database id>`" }` |
150150
| You can get the connection string from the Azure Cosmos DB account page in the Azure portal by selecting **Keys** in the left navigation pane. Make sure to select a full connection string and not just a key. |
151151
152-
| Managed identity connection string |
153-
|------------------------------------|
154-
|`{ "connectionString" : "ResourceId=/subscriptions/<your subscription ID>/resourceGroups/<your resource group name>/providers/Microsoft.DocumentDB/databaseAccounts/<your cosmos db account name>/;(ApiKind=[api-kind];)/(IdentityAuthType=[identity-auth-type])" }`|
155-
|This connection string doesn't require an account key, but you must have a search service that can [connect using a managed identity](search-howto-managed-identities-data-sources.md). For connections targeting the [SQL API](/azure/cosmos-db/sql-query-getting-started), you can omit `ApiKind` from the connection string. For more information about `ApiKind`, `IdentityAuthType` see [Setting up an indexer connection to an Azure Cosmos DB database using a managed identity](search-howto-managed-identities-cosmos-db.md).|
152+
| (Legacy approach) Managed identity connection string |
153+
|------------------------------------------------------|
154+
|`{ "connectionString" : "ResourceId=/subscriptions/<your subscription ID>/resourceGroups/<your resource group name>/providers/Microsoft.DocumentDB/databaseAccounts/<your cosmos db account name>/;(ApiKind=[api-kind];)/(IdentityAuthType=AccountKey)" }`|
155+
|This connection string doesn't require an account key to be specified directly, but the search service will utilize the managed identity to fetch the account keys in the background. Though this is supported for all CosmosDB account typess, it is not recommended for the NoSQL account type. Such a connection string will not work if account keys are disabled for the CosmosDB account. Note that if the `IdentityAuthType` property is omitted, the search service will still default to fetching the account key in the background. For connections targeting the [SQL API](/azure/cosmos-db/sql-query-getting-started), you can omit `ApiKind` from the connection string. For more information about `ApiKind`, `IdentityAuthType` see [Setting up an indexer connection to an Azure Cosmos DB database using a managed identity](search-howto-managed-identities-cosmos-db.md)|
156+
157+
| (Recommended approach) Managed identity connection string for NoSQL accounts |
158+
|------------------------------------------------------------------------------|
159+
|`{ "connectionString" : "ResourceId=/subscriptions/<your subscription ID>/resourceGroups/<your resource group name>/providers/Microsoft.DocumentDB/databaseAccounts/<your cosmos db account name>/;(ApiKind=[api-kind];)/(IdentityAuthType=AccessToken)" }`|
160+
|This connectiong string, supported only for Azure CosmosDB for NoSQL accounts, will ensure that the search service will never use account keys (even in the background) when attempting to access data from CosmosDB. This is recommended, as it will work even if the NoSQL account has account keys disabled. For more information see [Setting up an indexer connection to an Azure Cosmos DB database using a managed identity](search-howto-managed-identities-cosmos-db.md)|
156161
157162
<a name="flatten-structures"></a>
158163

0 commit comments

Comments
 (0)