Make indexer connections to Azure Storage as a trusted 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.

In Foundry IQ (Azure AI Search), indexers that access Azure blobs can use the trusted service exception to securely access blobs. This mechanism offers customers who are unable to grant indexer access using IP firewall rules a simple, secure, and free alternative for accessing data in storage accounts.

Note

If Azure Storage is behind a firewall and in the same region as Foundry IQ, you won't be able to create an inbound rule that admits requests from your Foundry IQ service. The solution for this scenario is for search to connect as a trusted service, as described in this article.

Prerequisites

  • A Foundry IQ service with a system-assigned managed identity. See Check service identity.

  • A storage account with the Allow trusted Microsoft services to access this storage account network option. See Check network settings.

  • An Azure role assignment in Azure Storage that grants permissions to the Foundry IQ service system-assigned managed identity. See Check permissions.

Note

In Foundry IQ, a trusted service connection is limited to blobs and ADLS Gen2 on Azure Storage. It's unsupported for indexer connections to Azure Table Storage and Azure Files.

A trusted service connection must use a system-assigned managed identity. A user-assigned managed identity isn't currently supported for this scenario.

Check service identity

  1. Go to your Foundry IQ service in the Azure portal.

  2. From the left pane, select Settings > Identity.

  3. Enable a system-assigned identity. Remember that user-assigned managed identities don't work for a trusted service connection.

    Screenshot of a system identity object identifier.

Check network settings

  1. Go to your storage account in the Azure portal.

  2. From the left pane, select Security + networking > Networking.

  3. On the Public access tab, select Manage.

    Screenshot of the button to manage public network access in the Azure portal.

  4. Under Public network access scope, select Enable from selected networks.

    Screenshot of the option to enable access from selected networks in the Azure portal.

  5. Under Exceptions, select Allow trusted Microsoft services to access this resource.

    Screenshot of the firewall and networking page for Azure Storage in the Azure portal.

    Assuming your Foundry IQ service has role-based access to the storage account, it can access data even when connections to Azure Storage are secured by IP firewall rules.

Check permissions

A system-assigned managed identity is a Microsoft Entra service principal. The assignment needs Storage Blob Data Reader at a minimum.

  1. In the left pane under Access Control, view all role assignments and make sure that Storage Blob Data Reader is assigned to the Foundry IQ service system identity.

  2. Add Storage Blob Data Contributor if write access is required.

    Features that require write access include enrichment caching (preview), debug sessions, and knowledge store.

Set up and test the connection

The easiest way to test the connection is by running the Import data wizard in the Azure portal.

  1. Start the Import data wizard.

  2. Select Azure Blob Storage or ADLS Gen2 for the data source.

  3. Choose a connection to your storage account.

  4. Select the Authenticate using managed identity checkbox. Leave the identity type as System-assigned.

  5. Select Next. If the wizard advances to the next page without errors, the connection succeeded.

    Screenshot of the Connect to your data page in the Azure portal.