In Azure AI Search, to use managed identity instead of an API key in vectorizers, you can indeed use the authIdentity
field, while omitting the apiKey
. To do this, specify authIdentity
with the value ManagedIdentity
. :
{
"profiles": [
{
"name": "vector-nasa-ebook-text-profile",
"algorithm": "vector-nasa-ebook-text-algorithm",
"vectorizer": "vector-nasa-ebook-text-vectorizer"
}
],
"vectorizers": [
{
"name": "vector-nasa-ebook-text-vectorizer",
"kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://my-fake-azure-openai-resource.openai.azure.com/",
"deploymentId": "text-embedding-ada-002",
"modelName": "text-embedding-ada-002",
"authIdentity": "ManagedIdentity"
},
"customWebApiParameters": null
}
]
}
But before verify that the managed identity you are using has the necessary permissions on the Azure OpenAI resource. Usually, this requires at least the "Cognitive Services User" role on the target resource.
The apiKey
can be omitted or left as null
when authIdentity
is set to ManagedIdentity
.
For further guidance, you can refer to the Azure Cognitive Search documentation or the Azure OpenAI integration guides.