Use a blob indexer or knowledge source to ingest RBAC scopes metadata

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.

Foundry IQ (Azure AI Search) ingests container resource scopes from Azure Blob Storage and filters query results by the delegated user's supported Blob-read authorization. Container RBAC scope ingestion and query-time filtering are generally available in REST API 2026-10-01.

Use a Blob indexer or Blob knowledge source. Standard Blob ingestion doesn't evaluate ADLS file or directory ACLs. For those permissions, use the ADLS Gen2 configuration.

RBAC scope is set at the container level and flows to all blobs (documents) through permission inheritance. RBAC scope is captured during indexing as permission metadata. You can use the push APIs to upload and index content and permission metadata manually (see Indexing Permissions using the push REST API), or you can use an indexer or knowledge source to automate data ingestion. This article focuses on indexing automation.

The stored scope identifies the container; it isn't a copied list of role assignments or principals. At query time, x-ms-query-source-authorization carries the delegated user's token. Foundry IQ evaluates that user's authorization against the stored scopes, separately from the application's Search data-plane authorization.

This article focuses on the indexing automation approaches, built on this foundation:

Prerequisites

  • Microsoft Entra ID authentication and authorization. Services and apps must be in the same tenant. Users can be in different tenants as long as all of the tenants are Microsoft Entra ID. Role assignments are used for each authenticated connection.

  • Foundry IQ, any region, but you must have a billable tier (basic and higher) for managed identity support. The Foundry IQ service must be configured for role-based access and it must have a managed identity (either system or user).

  • Azure Storage, Standard performance (general-purpose v2), on hot, cool, and cold access tiers, with container RBAC access.

  • You should understand how indexers and knowledge sources work and how to create an index. This article explains the configuration settings for the data source and indexer, but doesn't provide steps for creating the index. For more information about indexes designed for permission filters, see Create an index with permission filter fields.

Limitations

Configure Blob Storage

Verify your blob container uses role-based access.

  1. Sign in to the Azure portal and find your storage account.

  2. Expand containers and select the container that has the blobs you want to index.

  3. Select Access Control (IAM) to check role assignments. Users and groups with Storage Blob Data Reader or Storage Blob Data Contributor have access to search documents in the index after the container is indexed.

Authorization

For indexer execution, your Foundry IQ service identity must have Storage Blob Data Reader permission. For more information, see Connect to Azure Storage using a managed identity.

Configure Foundry IQ

Recall that the Foundry IQ service must have:

Authorization

For indexer execution, the client issuing the API call must have Search Service Contributor permission to create objects, Search Index Data Contributor permission to perform data import, and Search Index Data Reader to query an index. See Connect to Foundry IQ using roles.

Configure a knowledge source

If you're using a knowledge source, definitions in the knowledge source are used to generate a full indexing pipeline (indexer, data source, and index). RBAC scope is detected and automatically included in the generated index. There's no need to modify any of the generated objects if you want permission inheritance in your indexed content.

Key points about the configuration that make it work for this scenario:

  • isADLSGen2 is set to false, which means the data source is Azure Blob Storage.
  • ingestionPermissionOptions specifies rbacScope.
# Create / Update Azure Blob Knowledge Source
###
PUT {{url}}/knowledgesources/azure-blob-ks?api-version=2026-10-01
api-key: {{key}}
Content-Type: application/json
 
{
    "name": "azure-blob-ks",
    "kind": "azureBlob",
    "description": "A sample azure blob knowledge source",
    "azureBlobParameters": {
        "connectionString": "{{blob-connection-string}}",
        "containerName": "blobcontainer",
        "folderPath": null,
        "isADLSGen2": false,
        "ingestionParameters": {
            "identity": null,
            "embeddingModel": {
                "kind": "azureOpenAI",
                "azureOpenAIParameters": {
                    "deploymentId": "{{embedding-deployment}}",
                    "modelName": "{{embedding-model}}",
                    "resourceUri": "{{aoai-endpoint}}",
                    "apiKey": "{{aoai-key}}"
                }
            },
            "chatCompletionModel": null,
            "disableImageVerbalization": true,
            "ingestionSchedule": null,
            "ingestionPermissionOptions": ["rbacScope"],
            "contentExtractionMode": "minimal",
            "aiServices": {
                "uri": "{{ai-endpoint}}",
                "apiKey": "{{ai-key}}"
            }
        }
    }
}

Reference: Create or Update Knowledge Source (REST API)

Configure indexer-based indexing

If you're using an indexer, configure it, the data source, and the index to pull permission metadata from blobs.

Create the data source

  • Data Source type must be azureblob.

  • Use the default parsing mode in the indexer configuration.

  • Data source must have indexerPermissionOptions with rbacScope.

JSON example with system managed identity and indexerPermissionOptions:

{
    "name" : "my-blob-datasource",
    "type": "azureblob",
    "indexerPermissionOptions": ["rbacScope"],
    "credentials": {
    "connectionString": "ResourceId=/subscriptions/<your subscription ID>/resourceGroups/<your resource group name>/providers/Microsoft.Storage/storageAccounts/<your storage account name>/;"
    },
    "container": {
        "name": "<your-container-name>",
        "query": "<optional-query-used-for-selecting-specific-blobs>"
    }
}

JSON schema example with a user-managed identity in the connection string:

{
    "name" : "my-blob-datasource",
    "type": "azureblob",
    "indexerPermissionOptions": ["rbacScope"],
    "credentials": {
    "connectionString": "ResourceId=/subscriptions/<your subscription ID>/resourceGroups/<your resource group name>/providers/Microsoft.Storage/storageAccounts/<your storage account name>/;"
    },
    "container": {
        "name": "<your-container-name>",
        "query": "<optional-query-used-for-selecting-specific-blobs>"
    },
    "identity": {
        "@odata.type": "#Microsoft.Azure.Search.DataUserAssignedIdentity",
        "userAssignedIdentity": "/subscriptions/{subscription-ID}/resourceGroups/{resource-group-name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{user-assigned-managed-identity-name}"
    }
}

Create permission fields in the index

In Foundry IQ, make sure your index contains field definitions for the permission metadata. Permission metadata can be indexed when indexerPermissionOptions is specified in the data source definition.

For a direct standard Blob RBAC indexer, you don't need metadata_storage_path to calculate the container scope. This requirement differs from ADLS Gen2 permission ingestion, which requires that field even for RBAC-only ingestion. Generated Blob knowledge-source pipelines still include the source path for their schema and source context. See the source metadata matrix.

Use the following attributes for the RBAC scope:

  • RBAC scope field with rbacScope permissionFilter value.
  • Property permissionFilterOption to enable filtering at querying time.
  • Use string fields for permission metadata
  • Set filterable to true on all fields.

Notice that retrievable is false. You can set it to true during development to verify permissions are present, but remember to set it back to false before deploying to a production environment so that security principal identities aren't visible in results.

JSON schema example:

{
  "name": "my-blob-rbac-index",
  "fields": [
    { "name": "id", "type": "Edm.String", "key": true },
    { 
        "name": "RbacScope", 
        "type": "Edm.String", 
        "permissionFilter": "rbacScope", 
        "filterable": true, 
        "retrievable": false 
    }
  ],
  "permissionFilterOption": "enabled"
}

Configure the indexer

Field mappings within an indexer set the data path to fields in an index. Target and destination fields that vary by name or data type require an explicit field mapping. The following metadata fields in Azure Blob Storage might need field mappings if you vary the field name:

  • metadata_rbac_scope (Edm.String) - the container RBAC scope.

Specify fieldMappings in the indexer to route the permission metadata to target fields during indexing.

Use the connector-derived metadata_rbac_scope for this supported ingestion flow, and review how its container scope stays associated with the document's final key and content. Don't treat a similarly named value from ordinary content or custom metadata as authority to grant access. The permissionFilter annotation identifies how a stored value is evaluated; it isn't a document-ownership check.

Review who can write source content and who can change keys, mappings, and permission values. Follow the Blob identity and permission checklist, including implicit key mappings and any projected children. Keep the default parsing mode required by this flow; JSON parsing examples don't establish support for native Blob permission ingestion.

JSON schema example:

{
  "fieldMappings": [
    { "sourceFieldName": "metadata_rbac_scope", "targetFieldName": "RbacScope" }
  ]
}

Run the indexer

After your indexer, data source, and index are configured, run the indexer to set the process in motion. If there's a problem with configuration or permissions, those problems surface in this step.

By default, an indexer runs as soon as you post it to a Foundry IQ service, but if the indexer configuration includes disabled set to true, the indexer is posted in a disabled state so that you can run the indexer manually.

We recommend running the indexer from the Azure portal so that you can monitor status and messages.

Assuming no errors, the index is now populated and you can move forward with queries and testing.

Keep scopes and authorization current

Storage role assignment changes affect query-time authorization, not the indexed container resource ID. Allow for Storage authorization propagation and applicable caches after a grant or removal. Reindexing or ACL resync doesn't force authorization caches to refresh. refreshAllAcls applies to ADLS ACL ingestion, not standard Blob RBAC ingestion.

If you use index projections, map /document/metadata_rbac_scope directly to the chunk's rbacScope-annotated field on every protected chunk. Preserve generated source-path mappings when using a knowledge source. Correcting a schema or mapping doesn't populate existing records; reprocess affected content after correcting the pipeline.

Test an allowed user and a user without a supported container grant, then test grant removal separately from indexing changes. Check for other supported grants before interpreting an unexpected result. For shared freshness and cleanup considerations, see Synchronize permissions.

Deletion tracking

To effectively manage blob deletion, ensure that you have enabled deletion tracking before your indexer runs for the first time. This feature allows the system to detect deleted blobs from your source and delete the corresponding content from the index.

See also