Use an ADLS Gen2 indexer to ingest permission 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.

Azure Data Lake Storage (ADLS) Gen2 supports per-user access to directories and files through access control lists (ACLs) and role-based access control (Azure RBAC). Attribute-based access control (Azure ABAC) isn't supported.

Foundry IQ (Azure AI Search) ingests supported ACL entries and container RBAC scopes alongside document content. Ingestion and query-time permission filtering are generally available in REST API 2026-10-01. This supported subset doesn't provide full parity with every Storage authorization policy. This is one of several strategies for document-level access control in Foundry IQ.

This article explains how to configure an ADLS Gen2 indexer or ADLS Gen2 blob knowledge source to automatically pull permission metadata into a search index. It supplements Index data from ADLS Gen2 and Create a blob knowledge source for ADLS Gen2 with information specific to permission ingestion. To manually push permission metadata, see Index document ACLs using the push API.

Architecture diagram showing a security-trimmed RAG solution where an ADLS Gen2 indexer ingests documents and ACL and RBAC permission metadata from an ADLS Gen2 container, stores them in a Foundry IQ index, and a RAG orchestrator filters query results so each user retrieves only documents they're authorized to access.

Prerequisites

Limitations

Unsupported implicit blocklists

Foundry IQ doesn't support implicit blocklists: source ACL configurations that grant access broadly through Other while excluding named users or groups. It can't represent these configurations as "everyone except these identities."

The following source ACL is an unsupported configuration, not a setup recommendation. It combines an Other read grant with named user and group entries that have no permissions:

user::rw-
user:22222222-2222-2222-2222-222222222222:---
group::r--
group:bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb:---
mask::r--
other::r--

For this configuration, the indexer records the no-access value none in both metadata_user_ids and metadata_group_ids. No user or group receives access through the indexed ACLs. This isn't a document-wide deny: an independent supported RBAC grant can still authorize access. It doesn't mean that the file's content necessarily failed to ingest.

To remediate the source policy and update indexed permissions:

  1. Identify the intended allowed and denied identities, relevant group memberships, ancestor-directory traversal permissions, and independent RBAC grants.
  2. Replace the unsupported implicit blocklist design with supported named-user and named-group allowlists for the identities intended to have access. Don't simply delete restrictive named entries while leaving a broad Other grant, because that can widen source access. Don't broaden the ACL mask or add RBAC grants as a workaround.
  3. Verify the source policy with representative permitted and denied identities. Review existing files and directories separately from default ACLs for new children. Changing a parent's default ACL doesn't update existing descendants.
  4. Synchronize indexed permissions. For deliberate full-source reconciliation, request a permissions resync while the indexer is idle, then run it or await its schedule. Monitor completion. Alternatively, default-enabled automatic ACL refresh updates ACLs on eligible normal runs roughly daily, not immediately or on every scheduled run.
  5. If existing records lack required source paths or chunk mappings, correct the pipeline and reprocess those records. Permission-only resync doesn't repair missing source context.
  6. Verify permitted and denied Search results, including affected chunks. Test an ACL-only user without an alternate grant separately from an independently RBAC-authorized user. Successful ingestion or refresh alone doesn't prove that the remediated policy preserves the intended access.

The indexer reports a warning when it encounters unsupported exclusions. Inspect execution history, warnings, and errors; don't assume a separate warning identifies every affected file. Previously indexed permissions can remain until a successful update, and partial failures can leave mixed freshness. After successful processing, no ACL-derived access for this pattern is intentional, not evidence of a stale index. Don't disable permission enforcement or use elevated reads as a workaround.

Support for the permission model

This section compares document-level access control features between ADLS Gen2 and Foundry IQ. It explains which Azure Data Lake Storage (ADLS) Gen2 access control mechanisms Foundry IQ supports or maps. This helps you understand how permissions are enforced at the document level.

ADLS Gen2 Feature Description Supported Notes
RBAC Coarse-grained access at container level Yes Foundry IQ honors RBAC for access to all documents in the entire container.
ABAC Attribute-based conditions on top of RBAC No Foundry IQ doesn't evaluate ABAC conditions for document-level access.
ACL Fine-grained permissions at directory/file (document) level Yes Foundry IQ uses document-level ACLs for permission filters.
Security groups Group-based permission assignments Yes Supported if security groups are mapped inside the document-level ACL.

At query time, Foundry IQ evaluates container-level RBAC first and then checks document-level ACL entries. Access is granted if any mechanism permits it.

Flowchart and truth table showing how Foundry IQ evaluates authorization by checking container-level RBAC first, then ACL group and user entries, granting access if any mechanism permits it and denying access only when all checks fail.

About ACL hierarchical permissions

Indexers and knowledge sources can retrieve ACL assignments from the specified container and all directories leading to each file by following the ADLS Gen2 hierarchical access evaluation flow. The final effective access lists for each file are computed and the different access categories are indexed into the corresponding index fields.

For example, in ADLS Gen2 common scenarios related to permissions as the file path /Oregon/Portland/Data.txt.

Operation / Oregon/ Portland/ Data.txt
Read Data.txt --X --X --X R--

The indexer or knowledge source collects ACLs from each container and directory. It then determines effective access at lower levels and continues until it resolves permissions for every file.

/ assigned access vs Oregon/ assigned access
  => Oregon/ effective access vs Portland/ assigned access
    => Portland/ effective access vs Data.txt assigned access
      => Data.txt effective access

Configure ADLS Gen2

An indexer or knowledge source can retrieve ACLs on a storage account if the following criteria are met. For more information about ACL assignments, see ADLS Gen2 ACL assignments.

Authorization

For indexing, your Foundry IQ service identity must have Storage Blob Data Reader permission.

If you're testing locally, you should also have a Storage Blob Data Reader role assignment. For more information, see Connect to Azure Storage using a managed identity.

Root container permissions

  1. Assign all Group and User sets (security principals) at the root container / with Read and Execute permissions.

  2. Ensure both Read and Execute are added as "Default permissions" so they propagate to newly created files and directories automatically.

Propagate permissions down the file hierarchy

Although new directories and files inherit permissions, existing directories and files don't automatically inherit these assignments.

Use the ADLS Gen2 tool to apply ACLs recursively for assignments propagation on existing content. This tool propagates the root container's ACL assignments to all underlying directories and files.

Remove excess permissions

After applying ACLs recursively, review permissions for each directory and file.

Remove any Group or User sets that shouldn't have access to specific directories or files. For example, remove User2 on folder Portland/, and for folder Idaho remove Group2 and User2 from its assignments, and so on.

Sample ACL assignments structure

Here's a diagram of the ACL assignment structure for the fictitious directory hierarchy in the ADLS Gen2 documentation.

Diagram of an ACL assignment structure.

Update ACL assignments over time

When you add or modify ACL assignments, apply them to the intended directories and files. To update indexed permissions without reprocessing unchanged content, follow Synchronize permissions between indexed and source content.

Configure Foundry IQ

Recall that the Foundry IQ service must have:

Authorization

For indexing, 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.

If you're testing locally, you should have the same role assignments. For more information, 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). ACL assignments are 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 true, meeting the data source requirement for this scenario.
  • ingestionPermissionOptions specifies user and group IDs.
# 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": true,
        "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": [
                "userIds","groupIds"
                           ],
            "contentExtractionMode": "minimal",
            "aiServices": {
                "uri": "{{ai-endpoint}}",
                "apiKey": "{{ai-key}}"
            }
        }
    }
}
###

Configure indexer-based indexing

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

Create the data source

This section supplements Index data from ADLS Gen2 with information that's specific to ingesting permissions alongside document content into a Foundry IQ index.

  • Data Source type must be adlsgen2.

  • Data source must have indexerPermissionOptions with userIds, groupIds, and/or rbacScope.

JSON example with system managed identity:

{
    "name" : "my-adlsgen2-acl-datasource",
    "type": "adlsgen2",
    "indexerPermissionOptions": ["userIds", "groupIds", "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-virtual-directory-name>"
    }
}

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

{
    "name" : "my-adlsgen2-acl-datasource",
    "type": "adlsgen2",
    "indexerPermissionOptions": ["userIds", "groupIds", "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-virtual-directory-name>"
    },
    "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.

Include a field named exactly metadata_storage_path with type Edm.String. Preserve the original source path without a mapping function. This field is required for ADLS Gen2 permission ingestion, including RBAC-only configurations. An encoded document key, citation URL, or parent ID doesn't replace it.

Recommended schema attributes for ACL (UserIds, GroupIds) and RBAC Scope:

  • User identifier (ID) field with userIds permissionFilter value.
  • Group IDs field with groupIds permissionFilter value.
  • RBAC scope field with rbacScope permissionFilter value.
  • Property permissionFilterOption to enable filtering at querying time.
  • Use string collections for user and group IDs, and a scalar string for the RBAC scope.
  • Set filterable to true on all fields.

Notice that retrievable is false. You can set it true during development to verify permissions are present, but remember to set to back to false before deploying to a production environment.

The following complete minimal index definition includes the source path and permission fields. Add your content fields as needed.

{
  "name": "my-adlsgen2-acl-index",
  "fields": [
    { "name": "id", "type": "Edm.String", "key": true },
    { "name": "metadata_storage_path", "type": "Edm.String", "searchable": false, "filterable": true, "retrievable": true },
    { "name": "UserIds", "type": "Collection(Edm.String)", "permissionFilter": "userIds", "filterable": true, "retrievable": false },
    { "name": "GroupIds", "type": "Collection(Edm.String)", "permissionFilter": "groupIds", "filterable": true, "retrievable": false },
    { "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 ADLS Gen2 might need field mappings if you vary the field name:

  • metadata_user_ids (Collection(Edm.String)) - the ACL user IDs list.
  • metadata_group_ids (Collection(Edm.String)) - the ACL group IDs list.
  • metadata_rbac_scope (Edm.String) - the container RBAC scope.

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

The following field-mapping fragment belongs at the top level of the indexer definition, alongside parameters.

{
  "fieldMappings": [
    { "sourceFieldName": "metadata_storage_path", "targetFieldName": "metadata_storage_path" },
    { "sourceFieldName": "metadata_user_ids", "targetFieldName": "UserIds" },
    { "sourceFieldName": "metadata_group_ids", "targetFieldName": "GroupIds" },
    { "sourceFieldName": "metadata_rbac_scope", "targetFieldName": "RbacScope" }
  ]
}

Preserve permissions on projected chunks

If a skillset uses index projections, populate the chunk index through projection mappings, not just indexer field mappings. Every searchable chunk needs its source path and each configured permission field. Map annotated fields directly from /document/metadata_user_ids, /document/metadata_group_ids, and /document/metadata_rbac_scope; don't substitute skill-generated values.

For example, add the following projection configuration to a skillset that already produces /document/pages/*. The target adls-chunks index needs:

  • An Edm.String key with the keyword analyzer.
  • A filterable parent_id field of type Edm.String, separate from the key.
  • A searchable chunk field of type Edm.String.
  • The path and permission fields shown earlier, with permissionFilterOption set to enabled.
{
  "indexProjections": {
    "selectors": [
      {
        "targetIndexName": "adls-chunks",
        "parentKeyFieldName": "parent_id",
        "sourceContext": "/document/pages/*",
        "mappings": [
          { "name": "chunk", "source": "/document/pages/*" },
          { "name": "metadata_storage_path", "source": "/document/metadata_storage_path" },
          { "name": "UserIds", "source": "/document/metadata_user_ids" },
          { "name": "GroupIds", "source": "/document/metadata_group_ids" },
          { "name": "RbacScope", "source": "/document/metadata_rbac_scope" }
        ]
      }
    ],
    "parameters": {
      "projectionMode": "skipIndexingParentDocuments"
    }
  }
}

Don't map the generated chunk key or parent_id yourself. Keep the parent key field filterable so permission-only processing can find existing chunks. If you also index parent documents, populate their path and permission fields separately.

Adding fields or mappings doesn't backfill existing records. After correcting the schema, indexer mappings, and projections, reset and run the indexer to repopulate existing documents and chunks. This reprocesses content and enrichment; permission-only resync isn't a substitute for missing source context.

Recommendations and best practices

  • Plan the ADLS Gen2 folder structure carefully before creating any folders.

  • Organize identities into groups and use groups whenever possible, rather than granting access directly to individual users. Continuously adding individual users instead of applying groups increases the number of access control entries that must be tracked and evaluated. Not following this best practice can lead to more frequent security metadata updates required to the index as this metadata changes, causing increased delays and inefficiencies in the refresh process.

Synchronize permissions between indexed and source content

The index stores effective user and group ACLs and container resource scopes. It doesn't store a copy of Storage role assignments. Use the refresh path that matches the change:

Change Refresh path
Initial ingestion, new files, or changed content Normal indexing ingests content and supported permission metadata together.
ADLS file or directory ACLs only Default-enabled refreshAllAcls refreshes otherwise unchanged files on eligible normal runs, roughly daily.
Full-source ACL reconciliation on demand Request a permissions resync, then run the indexer or await its schedule and verify completion.
Storage RBAC role assignments Query-time authorization evaluates the delegated user's access to stored container scopes. Storage propagation and authorization caches apply; ACL resync doesn't force these caches to refresh.
Missing fields or mappings on existing records Correct the pipeline, then reset and reprocess existing records, including projected chunks.
Moves, renames, or deletions Use connector-specific identity and deletion tracking. Permission refresh doesn't clean up stale keys or orphaned chunks.

Automatic ACL refresh

refreshAllAcls is an indexer setting under parameters.configuration, available in REST API 2026-10-01. It defaults to true; omit it to use the default. To disable it, set parameters.configuration.refreshAllAcls to false when updating the indexer.

The automatic sweep applies only to ADLS Gen2 data sources ingesting user or group ACLs. It isn't a periodic RBAC refresh control for standard Blob or ADLS RBAC-only ingestion. Schedule or manually run the indexer: the setting doesn't start runs by itself.

On eligible normal runs, the indexer refreshes ACLs for unchanged files at a roughly daily cadence. It doesn't sweep on every scheduled run, and reset-docs and resync runs aren't normal-run sweeps. This cadence isn't a freshness SLA or an immediate-revocation guarantee.

Permission-only items update permission fields without extracting content, running skills, or regenerating embeddings. Changed content in the same normal run can still undergo extraction and enrichment. Existing projected chunks receive permission updates through the authoritative projection mappings.

If you disable automatic refresh, ACL-only changes can remain stale until you explicitly resync or reprocess affected content. For a full-source ACL reconciliation without waiting for the automatic sweep, follow How to resync and run indexers. Use reset-docs (preview) only when you need targeted content reprocessing.

Monitor and verify synchronization

Use Get Indexer Status to inspect execution times, status, item counts, warnings, and errors. A successful ordinary content run alone doesn't prove that an automatic ACL sweep occurred. Request acceptance also doesn't mean a resync has completed.

After failures or cancellation, some records can have newer permissions than others. Resolve errors, retry the supported refresh, and test representative documents and chunks before treating the corpus as reconciled. Record request IDs and execution times for troubleshooting; don't interpret an item count as a corpus-wide permission timestamp.

Verify both allowed and denied users after a file ACL change, group grant/removal, and ancestor-directory traversal change. For mixed ACL/RBAC ingestion, test ACL revocation with a user who has no alternate supported RBAC grant. An independent grant can still authorize access. Test RBAC grants and removals separately, allowing for authorization propagation and caches. See the tutorial verification steps.

Deletion tracking

To manage blob deletion effectively, make sure deletion tracking is enabled before your indexer runs for the first time. This feature lets the system detect deleted blobs in your source and remove them from the index.