Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
Foundry IQ (Azure AI Search) provides direct indexing and query APIs alongside higher-level knowledge source and knowledge base APIs for managed retrieval. Use the Azure portal, REST APIs, or Azure SDKs to configure these capabilities, or connect agents to knowledge bases in the Microsoft Foundry portal.
For terms that apply when you use supported non-Microsoft models, see Third-party models. If you configure API Management to route to supported third-party gateways, see Third-party gateways through API Management.
Use an Azure API Management (APIM) Premium v2 gateway endpoint for Foundry IQ (Azure AI Search) model calls. Search supports these endpoints for the workloads listed in Choose a supported workload and API, subject to the support boundaries.
This article describes the endpoint values Search accepts, the requests and credentials it sends, and how to connect privately. To configure the gateway itself, use the linked API Management documentation.
Prerequisites
- A Foundry IQ service and permission to update the index, skillset, knowledge source, or knowledge base that calls the model.
- An Azure API Management Premium v2 instance with an API that routes to your Azure OpenAI deployment. See Import an Azure OpenAI API as a REST API. That article also describes AI gateway features, which aren't supported for Foundry IQ model calls.
- For managed identity authentication, an enabled Foundry IQ service identity.
Support boundaries
Check these boundaries before you configure a gateway endpoint.
- Azure API Management Premium v2 is the only officially supported tier. Other tiers, classic tiers, and self-hosted or workspace gateways aren't supported.
- The AI gateway in Azure API Management and similar gateway offerings aren't officially supported for Foundry IQ model calls.
- API Management endpoints aren't supported for Content Understanding. This exclusion includes the Content Understanding skill and knowledge-source content extraction that uses Content Understanding.
- API Management endpoints aren't supported with sensitivity-label ingestion.
- The GenAI Prompt (Chat Completion) skill doesn't support API Management endpoints when you ingest access control lists (ACLs). See Restrictions with SharePoint permissions.
- The Azure portal, including the import wizards and the Foundry IQ knowledge base experience, doesn't accept API Management endpoints. Use the REST APIs or an Azure SDK.
Choose a supported workload and API
You can use API Management endpoints with these workloads:
- Azure OpenAI Embedding skill
- Azure OpenAI vectorizer
- GenAI Prompt skill
- Knowledge-source ingestion models
- Knowledge base retrieval models
Knowledge-source ingestion models and knowledge base retrieval models require 2026-11-01-preview. The skills and vectorizer support API Management endpoints in the API versions listed in their reference articles.
Understand endpoint and protocol requirements
The value you supply depends on whether Search builds the operation URL or uses it as provided.
Native endpoints
For the Azure OpenAI Embedding skill, Azure OpenAI vectorizer, and knowledge-source ingestion models, set resourceUri to the HTTPS gateway base URL, such as https://<apim-name>.azure-api.net. Set deploymentId separately.
Search also accepts a custom domain configured on the gateway.
Search appends the operation path to the base URL:
- Embeddings:
/openai/deployments/<deploymentId>/embeddings?api-version=2023-05-15 - Chat Completions:
/openai/deployments/<deploymentId>/chat/completions?api-version=2024-08-01-preview
Your gateway API must accept these paths. For complete examples, see the embedding skill and vectorizer references.
For the GenAI Prompt skill, set uri to the complete operation URL, including the path and any required query parameters.
Compatible endpoints
For a knowledge base retrieval model with kind: "openAICompatible", set uri to the complete HTTPS POST URL, including the path and query parameters. Search sends requests to that URL unchanged. It doesn't append an operation or api-version, doesn't follow redirects, and omits model from the request body.
Don't include credentials or a fragment in the URL. For protocol and model profile requirements, see Connect through Azure API Management.
Configure Search-to-gateway authentication
The credentials you use to create or query Search objects aren't sent to the gateway. Search authenticates to API Management with the credentials configured on the skill, vectorizer, knowledge source, or knowledge base. To configure how API Management accepts those credentials, see Authentication and authorization in API Management.
Native authentication
For the skills, vectorizer, and knowledge-source ingestion models, configure one of the following methods:
- API key: Set
apiKeyto the API Management subscription key. Search sends it in theapi-keyheader, notOcp-Apim-Subscription-Key, so set the API's subscription key header name toapi-key. - System-assigned managed identity: Omit both
apiKeyandauthIdentity. - User-assigned managed identity: Set
authIdentityto an identity attached to the Foundry IQ service.
With managed identity, Search requests a token for the https://cognitiveservices.azure.com audience. To validate it at the gateway, see Validate Microsoft Entra token.
Complete and test a native connection:
- Create or update the skillset, index, or knowledge source through a REST API or an Azure SDK. Include the endpoint and authentication settings described earlier.
- For indexer-based workloads, run the indexer. For the Azure OpenAI vectorizer, test the vectorizer.
- Confirm that the operation succeeds and that sanitized gateway telemetry shows requests reaching the intended backend. Don't log credentials or sensitive model content.
Compatible authentication
Knowledge base retrieval models with kind: "openAICompatible" use either stored authentication headers or a managed identity token for the application ID you set in managedIdentityAudience. They don't use the Cognitive Services audience. For property requirements and a user-assigned identity example, see Connect through Azure API Management.
Configure gateway-to-backend authentication
API Management authenticates to Azure OpenAI separately from how Search authenticates to API Management. See Use managed identities in API Management and the authentication-managed-identity policy.
Select the role scope and identity
Assign Cognitive Services OpenAI User on the Azure OpenAI or parent Foundry resource to the identity that calls Azure OpenAI. When API Management uses its own managed identity, assign the role to that identity, not to the Search identity. For role scope, see Assign a role.
Use a compatible knowledge base model
Models with kind set to azureOpenAI don't accept API Management endpoints. OpenAI-compatible retrieval models aren't supported in knowledge bases with Web knowledge sources or when the Foundry IQ service's dataExfiltrationProtections includes All.
To route a knowledge base retrieval model through API Management:
- Use the
2026-11-01-previewREST API version. - Set
kindtoopenAICompatibleand configureopenAICompatibleParameters. See Connect through Azure API Management. - Verify the retrieval model connection.
Update credentials and model configuration
Compatible knowledge base headers are write-only and aren't returned in responses. For when stored credentials are preserved and how to rotate them, see Connection and update requirements.
Configure private connectivity
Indexer-based workloads can reach an API Management Premium v2 gateway through a shared private link with resource type Microsoft.ApiManagement/service and group ID Gateway. To create the link and run the indexer in the private environment, see Make outbound connections through a shared private link. This route doesn't apply to knowledge base retrieval or query-time vectorization.
Use the gateway hostname, not a private IP address, in the model URL. For DNS and public access settings on the gateway, see Set up an inbound private endpoint for Azure API Management.
Security considerations
Search sends model inputs and the configured credentials to the endpoint you specify. Use only gateways you own and control.
Restrict who can change model connections in Search. Ensure gateway logs don't store credentials or sensitive model content.
Related content
Use these articles to configure knowledge bases, service identities, and private connections.