Hi Vijay Gawte,
You grant access to trusted services on both ai search and open ai.
In openai
and in search service.
Next, enable managed identity in azure openai and assign
Search Service Contributor
role to it, because
When you send API calls to chat with an Azure OpenAI model on your data, the service needs to retrieve the index fields during inference to perform fields mapping. Therefore the service requires the Azure OpenAI identity to have the
Search Service Contributor
role for the search service even during inference.
Check this documentation.
Enable system managed identity.
and role assignments
Then you make chat completion with authentication
type to search service like below.
"data_sources": [
{
"type": "azure_search",
"parameters": {
"endpoint": search_endpoint,
"index_name": search_index,
"authentication": {
"type": "system_assigned_managed_identity"
}
}
}
]
Hope above steps helps to solve your issue. Please don't forget to upvote this answer if it was helpful.