Skip to content

Commit 346bc43

Browse files
authored
Update search-howto-managed-identities-data-sources.md
Updated with examples for user-assigned managed identity.
1 parent 0141c35 commit 346bc43

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

articles/search/search-howto-managed-identities-data-sources.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.custom:
1111
- ignite-2023
1212
- build-2024
1313
ms.topic: how-to
14-
ms.date: 07/02/2024
14+
ms.date: 07/25/2024
1515
---
1616

1717
# Configure a search service to connect using a managed identity in Azure AI Search
@@ -200,6 +200,7 @@ You can use a preview Management REST API instead of the portal to assign a user
200200
+ "type" is the type of identity. Valid values are "SystemAssigned", "UserAssigned", or "SystemAssigned, UserAssigned" for both. A value of "None" clears any previously assigned identities from the search service.
201201
202202
+ "userAssignedIdentities" includes the details of the user assigned managed identity. This identity [must already exist](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md) before you can specify it in the Update Service request.
203+
203204
204205
---
205206
@@ -313,6 +314,7 @@ A custom skill targets the endpoint of an Azure function or app hosting custom c
313314

314315
An Azure OpenAI embedding skill and vectorizer in AI Search target the endpoint of an Azure OpenAI service hosting an embedding model. The endpoint is specified in the [Azure OpenAI embedding skill definition](cognitive-search-skill-azure-openai-embedding.md) and/or in the [Azure OpenAI vectorizer definition](vector-search-how-to-configure-vectorizer.md). The system-managed identity is used if configured and if the "apikey" and "authIdentity" are empty. The "authIdentity" property is used for user-assigned managed identity only.
315316

317+
**System-managed identity example:**
316318

317319
```json
318320
{
@@ -349,6 +351,51 @@ A custom skill targets the endpoint of an Azure function or app hosting custom c
349351
]
350352
```
351353

354+
**User-assigned managed identity example:**
355+
356+
```json
357+
{
358+
"@odata.type": "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill",
359+
"description": "Connects a deployed embedding model.",
360+
"resourceUri": "https://url.openai.azure.com/",
361+
"deploymentId": "text-embedding-ada-002",
362+
"modelName": "text-embedding-ada-002",
363+
"inputs": [
364+
{
365+
"name": "text",
366+
"source": "/document/content"
367+
}
368+
],
369+
"outputs": [
370+
{
371+
"name": "embedding"
372+
}
373+
],
374+
"authIdentity": {
375+
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
376+
"userAssignedIdentity": "/subscriptions/<subscription_id>/resourcegroups/<resource_group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<user-assigned-managed-identity-name>"
377+
}
378+
}
379+
```
380+
381+
```json
382+
"vectorizers": [
383+
{
384+
"name": "my_azure_open_ai_vectorizer",
385+
"kind": "azureOpenAI",
386+
"azureOpenAIParameters": {
387+
"resourceUri": "https://url.openai.azure.com",
388+
"deploymentId": "text-embedding-ada-002",
389+
"modelName": "text-embedding-ada-002"
390+
"authIdentity": {
391+
"@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
392+
"userAssignedIdentity": "/subscriptions/<subscription_id>/resourcegroups/<resource_group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<user-assigned-managed-identity-name>"
393+
}
394+
}
395+
}
396+
]
397+
```
398+
352399
## Check for firewall access
353400

354401
If your Azure resource is behind a firewall, make sure there's an inbound rule that admits requests from your search service.

0 commit comments

Comments
 (0)