Secure a Foundry IQ (Azure AI Search) service

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.

This article provides security best practices to help protect your Foundry IQ (Azure AI Search) service. You're responsible for implementing these customer-configurable security controls. For information about Microsoft's built-in protections, such as network architecture, encryption, and compliance certifications, see Data, privacy, and built-in protections in Foundry IQ.

As a solutions architect, you should configure security controls across three domains:

  • Network security: Control inbound and outbound traffic to your Foundry IQ service.
  • Authentication and authorization: Define how, who, and what can access your Foundry IQ service and data.
  • Data protection: Implement encryption, access controls, and monitoring.

The security recommendations in this article implement Zero Trust principles: "Verify explicitly", "Use least privilege access", and "Assume breach". For comprehensive Zero Trust guidance, see the Zero Trust Guidance Center.

Understand network traffic patterns

Before you configure network security, understand the three network traffic patterns in Foundry IQ:

  • Inbound traffic: Requests from clients to your Foundry IQ service, such as queries, indexing, and management operations. This traffic is configurable by customers.

  • Outbound traffic: Requests from your Foundry IQ service to external resources, such as indexers that connect to data sources, vectorizers, and custom skills. This traffic is configurable by customers.

  • Internal traffic: Service-to-service calls over the Microsoft backbone network. This traffic is managed by Microsoft and isn't configurable by customers. For more information, see Internal traffic protection.

You configure inbound and outbound connections independently. A private endpoint for your Foundry IQ service controls incoming client requests, not outgoing connections to data sources or AI resources. Your application can connect privately to Search while Search connects to a data source through its public endpoint. See Configure outbound connections.

Configure network security

Use one of the following approaches to restrict inbound access to your Foundry IQ service. These approaches are listed from least secure to most secure:

Create IP firewall rules

Create inbound firewall rules to admit requests only from specific IP addresses or address ranges. All client connections must be made through an allowed IP address. Otherwise, the connection is denied.

Sample architecture diagram for IP restricted access.

When to use: Basic protection scenarios where you need to restrict access to known IP addresses.

How to get started: See Configure network access and firewall rules for Foundry IQ.

Create a private endpoint

Create a private endpoint for Foundry IQ to allow clients on a virtual network to securely access data in a search index over a Private Link. The private endpoint uses an IP address from your virtual network address space.

Network traffic between the client and the Foundry IQ service traverses over the virtual network and a private link on the Microsoft backbone network, eliminating exposure from the public internet.

Sample architecture diagram for private endpoint access.

When to use: High-security scenarios requiring complete network isolation from the public internet.

How to get started: See Create a private endpoint for Foundry IQ.

Join a network security perimeter

Create a network security perimeter around your platform-as-a-service (PaaS) resources deployed outside of a virtual network to establish a logical network boundary. This establishes a perimeter that controls public network access through explicit access rules.

Inbound client connections and service-to-service connections occur within the boundary, simplifying defenses against unauthorized access. In Foundry IQ, it's common for solutions to use multiple Azure resources.

When to use: Solutions using multiple Azure PaaS resources that need coordinated network boundary protection.

How to get started:

Configure authentication and authorization

Foundry IQ supports two authentication approaches. You can use one approach and disable the other, or you can use both with appropriate controls.

Use Microsoft Entra authentication to establish the caller, rather than the request, as the authenticated identity. Azure role assignments determine authorization, providing centralized identity management, conditional access policies, and comprehensive audit trails.

The workflow for role-based access control is:

  1. Enable role-based access control: Configure your Foundry IQ service to accept Microsoft Entra ID authentication instead of (or in addition to) API keys. See Enable or disable role-based access control in Foundry IQ.

  2. Assign roles to users and groups: Grant least-privilege access using built-in roles (Search Service Contributor, Search Index Data Contributor, and Search Index Data Reader) to control who can manage and query indexes. See Connect to Foundry IQ using roles.

  3. Connect your application using identities: Authenticate without API keys by using DefaultAzureCredential, which supports managed identities, developer credentials, and other token-based flows. See Connect your app to Foundry IQ using identities.

Configure API key authentication

With key-based authentication, each request must include an admin or query API key to prove it originates from a trusted source. This approach is suitable for development environments, backward compatibility with existing applications, or scenarios where Microsoft Entra ID isn't available.

The workflow for key-based authentication is:

  1. Provide an API key in each request: Admin keys grant full access to all operations. Query keys grant read-only access to the documents collection of an index. See Connect to Foundry IQ using keys.

  2. Rotate admin keys on a schedule: Reduce the risk of key compromise by regularly regenerating admin keys. Foundry IQ services support two admin keys for zero-downtime rotation. See Regenerate admin keys.

Authorize control plane operations

Control plane operations (service creation, configuration, and deletion) are authorized through Azure Resource Manager role-based access control, the same model used across all Azure services. API keys don't apply to control plane operations. Three built-in Azure roles govern access:

Role Permissions
Owner Full control, including access management.
Contributor Full control except for access management.
Reader View-only access.

The workflow for authorizing control plane operations is:

  1. Assign administrative roles: Use built-in Azure roles (Owner, Contributor, and Reader) to grant least-privilege access and control who can create, configure, or delete Foundry IQ services. See Assign roles for service administration.

  2. Apply resource locks: Prevent accidental deletion of production Foundry IQ services by applying CanNotDelete or ReadOnly locks. See Lock your Azure resources to protect your infrastructure.

Authorize data plane operations

Data plane operations target content hosted on a Foundry IQ service, such as index creation, document loading, and queries. Authorize these operations through role-based access control, API keys, or both. For configuration steps, see (Recommended) Enable role-based access control and Configure API key authentication.

Grant access to individual indexes

Restrict user access to individual indexes by creating custom role definitions. This approach is essential for multi-tenant scenarios where each tenant's data must be isolated at the index level. See Grant access to a single index.

For solutions requiring security boundaries at the index level, see Design patterns for multitenant SaaS applications and Foundry IQ.

Note

API keys provide service-level access only. Anyone with an admin key can read, modify, or delete any index in the Foundry IQ service. For index-level isolation, use role-based access control or implement isolation in your application's middle tier.

Configure outbound connections

Outbound requests originate from a Foundry IQ service to other applications, typically made by indexers, custom skills, and vectorizers. Configure these connections to use secure authentication and network access.

By default, outbound connections use the destination's public endpoint. For private outbound access, configure and approve a shared private link. The destination must support private endpoints and appear in the supported resource types. A private endpoint for the Foundry IQ service doesn't configure these outbound links.

Some data sources, such as SharePoint Online, support only public connectivity from Search. You can still use an inbound private endpoint for Search with these sources. In some cases, public endpoint access doesn't necessarily mean traffic leaves the Microsoft network. Same-region Azure Storage connections have separate routing behavior.

Create a managed identity for your Foundry IQ service to authenticate to other Azure resources without storing credentials in your code. A managed identity eliminates the need to store and rotate connection strings with credentials.

The workflow for using a managed identity is:

  1. Configure a managed identity for the Foundry IQ service: Choose between a system-assigned or user-assigned managed identity. See Configure a Foundry IQ service to connect using a managed identity.

  2. Connect to external resources using the managed identity: Supported connections include Azure Storage, Azure Cosmos DB, Azure SQL Database, SQL Managed Instance, and Azure Functions.

Secure access to external data

Configure secure connections based on how external resources are protected:

Tip

If Azure Storage and Foundry IQ are in the same region, network traffic is automatically routed through a private IP address over the Microsoft backbone network, eliminating the need for firewall configuration. For more information, see Same-region Azure Storage and Foundry IQ.

Secure connections for external AI processing

Outbound requests for AI enrichment and vectorization require special consideration:

Operation Configuration
Indexers connecting to data sources Secure access to external data.
Custom skills calling external code Secure connections to Azure Functions, web apps, or other hosts.
Vectorization during indexing Connect to Azure OpenAI or custom embedding models.
Azure Key Vault Connect to Azure Key Vault for customer-managed encryption keys.

For basic retrieval-augmented generation (RAG) patterns where your client application calls a chat completion model, the connection uses the client or user identity, not the Foundry IQ service identity. For agentic retrieval using knowledge bases, the outbound request is made by the Foundry IQ service managed identity.

Implement document-level access control

Document-level access control, also known as row-level security, restricts which documents a user can retrieve based on their identity. Permission metadata is captured during indexing and enforced at query time, which is essential for agentic AI systems, RAG applications, and enterprise search solutions that require authorization checks at the document level. For a comprehensive overview of all supported approaches, see Document-level access control.

Use POSIX-like ACL and RBAC scopes

For Azure Data Lake Storage (ADLS) Gen2 content, configure indexers or knowledge sources to preserve POSIX-like ACL permissions and RBAC scopes during ingestion. At query time, results are filtered based on the caller's Microsoft Entra token. For more information, see Index ADLS Gen2 permission metadata.

ADLS ACL/RBAC and standard Blob container RBAC ingestion and query filtering are generally available in REST API 2026-10-01. Plan for indexed ACL freshness and query authorization caches. Verify both allowed and denied users, including chunks and identities without alternate grants; don't treat GA as an immediate-revocation guarantee.

Use SharePoint in Microsoft 365 ACLs

Configure the SharePoint in Microsoft 365 indexer to extract document permissions directly from SharePoint ACLs during ingestion. At query time, the system filters results based on the caller's Microsoft Entra token. SharePoint ACL ingestion and filtering are generally available with the 2026-10-01 REST API. For supported permission changes and refresh options, see Synchronize indexed SharePoint permissions.

Use sensitivity labels (preview)

Configure an indexer to automatically detect Microsoft Purview sensitivity labels during indexing and apply label-based access controls when queries are executed. This capability aligns Foundry IQ authorization with your enterprise's Microsoft Information Protection model. For more information, see Index Microsoft Purview sensitivity labels.

Use security filters

For scenarios where native ACL integration isn't viable, implement security filters to trim results based on user or group identities. Store identity information in a string field in your index, and then pass the caller's identity as a filter string at query time to exclude documents that don't match. This approach works with custom access models or non-Microsoft security frameworks. For more information, see Security filters for trimming results.

Configure data encryption

Foundry IQ encrypts all data automatically using Microsoft-managed keys. For information about built-in encryption, see Data encryption.

For enhanced data protection, you can implement the following encryption controls.

(Optional) Add customer-managed key encryption

Add an extra encryption layer for indexes and synonym maps by managing your own encryption keys in Azure Key Vault. Customer-managed keys (CMK) are for organizations with compliance requirements mandating customer control over encryption keys or key revocation capabilities. See Configure customer-managed keys for data encryption in Foundry IQ.

You can also configure the following options:

Important

  • CMK encryption increases index size and can degrade query performance by 30-60%. Only enable for indexes that require it.
  • CMK on temporary disks requires services created after May 13, 2021. Earlier services support CMK on data disks only.

Index encrypted blob content

Configure an indexer to process content from Azure Blob Storage that's encrypted at rest, which is separate from CMK encryption of the search index. See Tutorial: Index and enrich encrypted blobs.

(Optional) Enable confidential computing

Confidential computing protects data in use from unauthorized access, including from Microsoft, through hardware attestation and encryption. This compute type is only configurable during service creation. See Choose a compute type.

We only recommend confidential computing for organizations whose compliance or regulatory requirements necessitate data-in-use protection. For daily usage, the default compute type suffices.

Compute type Description Limitations Cost Availability
Default Standard VMs with built-in encryption for data at rest and in transit. No hardware-based isolation for data in use. No limitations. No change to the base cost of free or billable tiers. Available in all regions.
Confidential Confidential VMs (DCasv5 or DCesv5) in hardware-based trusted execution environment. Isolates computations and memory from the host operating system and other VMs. Disables or restricts agentic retrieval, semantic ranker, query rewrite (preview), skillset execution, and indexers that run in the multitenant environment 1. Adds 10% surcharge to the base cost of billable tiers. For more information, see the pricing page. Available in some regions. For more information, see the list of supported regions.

1 When you enable this compute type, indexers can only run in the private execution environment, meaning they run from the search clusters hosted on confidential computing.

Enable monitoring and logging

Track operations, detect anomalies, and support security audits by enabling logging and monitoring for your Foundry IQ service. For information about what Foundry IQ logs by default, see Data logging.

Maintain compliance

For information about Foundry IQ compliance certifications and the shared responsibility model, see Compliance and certifications.

Use Azure Policy

Apply resource tags

Apply resource tags to categorize Foundry IQ services by environment, data sensitivity, cost center, or compliance requirements for improved governance. See Use tags to organize your Azure resources and management hierarchy.

Security checklist

Use this checklist to ensure you've configured appropriate security controls:

Network security:

  • [ ] Configured IP firewall rules, private endpoint, or network security perimeter
  • [ ] Restricted inbound access to known clients or networks
  • [ ] Configured secure outbound connections using managed identities

Authentication and authorization:

  • [ ] Enabled role-based access control
  • [ ] Assigned appropriate roles to users and applications
  • [ ] Implemented admin key rotation schedule (if using keys)
  • [ ] Configured index-level permissions (if required)

Data protection:

  • [ ] Configured document-level access control (if required):
    • [ ] POSIX-like ACLs for ADLS Gen2 content
    • [ ] SharePoint in Microsoft 365 ACLs
    • [ ] Microsoft Purview sensitivity labels
    • [ ] Security filters for custom scenarios
  • [ ] Implemented CMK encryption (if required)
  • [ ] Evaluated confidential computing requirements (if applicable)

Monitoring and compliance:

  • [ ] Enabled diagnostic logging
  • [ ] Set up monitoring and alerts to identify anomalous activity
  • [ ] Applied resource tags for governance
  • [ ] Assigned Azure Policy for resource logging
  • [ ] Reviewed compliance certifications against requirements