An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
Welcome to Microsoft Q&A
Hello @Kedar Koppolu (Harman Connected Services Inc) , I hope you are doing well.
The two issues may be related to the difference between the Azure OpenAI resource endpoint and the Microsoft Foundry project endpoint.
For the first issue, the error:
401 Unauthorized - audience is incorrect (https://ai.azure.com)
strongly suggests an authentication audience mismatch. The Foundry project endpoint uses Microsoft Entra authentication with the https://ai.azure.com/.default scope, while the Azure OpenAI embeddings API uses the Cognitive Services audience (https://cognitiveservices.azure.com/.default). The Azure AI Search skillset integration may therefore not support using the Foundry project endpoint directly as the AzureOpenAIEmbeddingSkill resource URI in the same way as a direct Azure OpenAI endpoint.
I would recommend:
- Use the direct Azure OpenAI resource endpoint (
https://<resource>.openai.azure.com) forAzureOpenAIEmbeddingSkillif that is the endpoint supported by the skill configuration. - Verify that the embedding model deployment name and API version are correct.
- If Azure OpenAI has public network access disabled, verify the Azure AI Search managed identity/RBAC and networking configuration. Microsoft documents using managed identity and trusted-service access or a shared private link for Azure AI Search to access a secured Azure OpenAI resource.
For the secondary Foundry private network issue, if the Foundry project is configured with restricted or private network access, adding your client IP alone may not be sufficient. Microsoft Foundry supports public access from selected IP addresses or private endpoint access, and private endpoint scenarios also require correct DNS resolution and private networking configuration.
I would therefore troubleshoot these as two separate connectivity/authentication paths: the Search indexer → embedding model path, and your browser/client → Foundry project path. The fact that the direct Azure OpenAI endpoint works is a strong indication that the first issue is specifically related to the Foundry project endpoint and its authentication audience, rather than the model deployment itself.
References
- Microsoft Foundry REST API authentication
- Azure OpenAI Embeddings REST API
- Configure network isolation for Microsoft Foundry
- Azure OpenAI On Your Data network configuration
If my answer helped you, please consider marking it as accepted. This helps others in the community find similar solutions.This helps others in the community find similar solutions.
and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.