You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting in 2025-05-01-preview, you can now include RBAC scope alongside document ingestion in Azure AI Search and use those permissions to control access to search results.
16
+
Azure Storage allows for role-based access on containers in blob storage, where roles like **Storage Blob Data Reader** or **Storage Blob Data Contributor** determine whether someone has read or write access to content. Starting in 2025-05-01-preview, you can now include RBAC scope alongside document ingestion in Azure AI Search and use those permissions to control access to search results. If you have rights to the content, you can see those results in a search query. If you don't have rights (or more specifically, a role assignment), you *can't* see those results even if your permissions include **Search Index Data Reader** on the index.
17
17
18
-
You can use the push APIs to upload and index content and permission metadata manually see [Indexing Permissions using the push REST API](search-index-access-control-lists-and-rbac-push-api.md), or you can use an indexer to automate data ingestion. This article focuses on the indexer approach.
18
+
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](search-index-access-control-lists-and-rbac-push-api.md), or you can use an indexer to automate data ingestion. This article focuses on the indexer approach.
19
19
20
20
The indexer approach is built on this foundation:
21
21
22
22
+[Role-based access control (Azure RBAC)](/azure/storage/blobs/data-lake-storage-access-control-model#role-based-access-control-azure-rbac). There's no support for Attribute-based access control (Azure ABAC).
23
23
24
-
+[An Azure AI Search indexer for Blob](search-howto-indexing-azure-blob-storage.md) that retrieves and ingests data and metadata, including permission filters. To get permission filter support, you must use the 2025-05-01-preview REST API or a prerelease package of an Azure SDK that supports the feature.
24
+
+[An Azure AI Search indexer for blobs](search-howto-indexing-azure-blob-storage.md) that retrieves and ingests data and metadata, including permission filters. To get permission filter support, you must use the 2025-05-01-preview REST API or a preview package of an Azure SDK that supports the feature.
25
25
26
-
+[An index in Azure AI Search](search-how-to-create-search-index.md) containing the ingested documents and corresponding permissions. Permission metadata is stored as fields in the index. To set up queries that respect the permission filters, you must use the 2025-05-01-preview REST API or a prerelease package of an Azure SDK that supports the feature.
26
+
+[An index in Azure AI Search](search-how-to-create-search-index.md) containing the ingested documents and corresponding permissions. Permission metadata is stored as fields in the index. To set up queries that respect the permission filters, you must use the 2025-05-01-preview REST API or a preview package of an Azure SDK that supports the feature.
27
27
28
28
## Prerequisites
29
29
30
-
+[Microsoft Entra ID authentication and authorization](/entra/identity/authentication/overview-authentication). Servicesand apps must be in the same tenant. Role assignments are used for each authenticated connection.
30
+
+[Microsoft Entra ID authentication and authorization](/entra/identity/authentication/overview-authentication). Services, apps, and users must be in the same tenant. Role assignments are used for each authenticated connection.
31
31
32
32
+ Azure AI Search, any region, but you must have a billable tier (basic and higher) see [Service limits](search-limits-quotas-capacity.md) for managed identity support. The search service must be [configured for role-based access](search-security-enable-roles.md) and it must [have a managed identity (either system or user)](search-howto-managed-identities-data-sources.md).
33
33
34
34
## Limitations
35
35
36
-
+ The following indexer features don't support permission preservation capabilities but are otherwise operational for Azure Blob content-only indexing:
37
-
+ One-to-many [parsing modes](/rest/api/searchservice/indexers/create?view=rest-searchservice-2025-05-01-preview&preserve-view=true#blobindexerparsingmode), such as: `delimitedText`, `jsonArray`, `jsonLines`, and `markdown` with sub-mode `oneToMany`
36
+
+ Permission inheritance isn't available if the blob indexer is using a [one-to-many parsing mode](/rest/api/searchservice/indexers/create?view=rest-searchservice-2025-05-01-preview&preserve-view=true#blobindexerparsingmode), such as: `delimitedText`, `jsonArray`, `jsonLines`, and `markdown` with sub-mode `oneToMany`. You must use the default parsing mode that creates one search document for each blob in the container.
38
37
38
+
## Configure Blob storage for indexing permission metadata
39
+
40
+
Verify your blob container uses role-based access.
41
+
42
+
1. Sign in to the Azure portal and find your storage account.
43
+
44
+
1. Expand **containers** and select the container that has the blobs you want to index.
45
+
46
+
1. Select **Access Control (IAM)** to check role assignments. Users and groups with **Storage Blob Data Reader** or **Storage Blob Data Contributor** will have access to search documents in the index after the container is indexed.
39
47
40
48
### Authorization
41
49
42
-
For indexer execution, your search service identity must have **Storage Blob Data Reader** permission see [Connect to Azure Storage using a managed identity](search-howto-managed-identities-storage.md).
50
+
For indexer execution, your search service identity must have **Storage Blob Data Reader** permission. For more information, see [Connect to Azure Storage using a managed identity](search-howto-managed-identities-storage.md).
43
51
44
-
## Configure Azure AI Search for indexing permission filters
52
+
## Configure Azure AI Search for indexing permission metadata
45
53
46
54
Recall that the search service must have:
47
55
@@ -52,14 +60,16 @@ Recall that the search service must have:
52
60
53
61
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 Azure AI Search using roles](search-security-rbac.md).
54
62
55
-
## Indexing permission metadata
63
+
## Index permission metadata
56
64
57
65
In Azure AI Search, configure an indexer, data source, and index to pull permission metadata from blobs.
58
66
59
67
### Configure the data source
60
68
61
69
+ Data Source type must be `azureblob`.
62
70
71
+
+ Data source parsing mode must be the default.
72
+
63
73
+ Data source must have `indexerPermissionOptions` with `rbacScope`.
64
74
65
75
+ For `rbacScope`, configure the [connection string](search-howto-index-azure-data-lake-storage.md#supported-credentials-and-connection-strings) with managed identity format.
@@ -78,8 +88,8 @@ JSON example with system managed identity:
78
88
"connectionString": "ResourceId=/subscriptions/<your subscription ID>/resourceGroups/<your resource group name>/providers/Microsoft.Storage/storageAccounts/<your storage account name>/;"
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.
129
+
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 so that security principal identities aren't visible in results.
120
130
121
131
JSON schema example:
122
132
@@ -139,7 +149,7 @@ JSON schema example:
139
149
140
150
### Configure the indexer
141
151
142
-
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 might need field mappings if you vary the field name:
152
+
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:
143
153
144
154
+**metadata_rbac_scope** (`Edm.String`) - the container RBAC scope.
145
155
@@ -160,3 +170,9 @@ JSON schema example:
160
170
161
171
To effectively manage blob deletion, ensure that you have enabled [deletion tracking](search-howto-index-changed-deleted-blobs.md) before your indexer runs for the first time. This feature allows the system to detect deleted blobs from your source and have them deleted from the index.
162
172
173
+
## Related content
174
+
175
+
+[Search over Azure Blob Storage content](search-blob-storage-integration.md)
176
+
+[Configure a blob indexer](search-howto-indexing-azure-blob-storage.md)
177
+
+[Change and delete detection using indexers for Azure Storage](search-howto-index-changed-deleted-blobs.md)
178
+
+[Connect to Azure AI Search using roles](search-security-rbac.md)
Copy file name to clipboardExpand all lines: articles/search/search-document-level-access-overview.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure AI Search
4
4
description: Conceptual overview of document-level permissions in Azure AI Search.
5
5
author: gmndrg
6
6
ms.author: gimondra
7
-
ms.date: 07/03/2025
7
+
ms.date: 07/16/2025
8
8
ms.service: azure-ai-search
9
9
ms.update-cycle: 90-days
10
10
ms.topic: conceptual
@@ -21,37 +21,40 @@ Azure AI Search supports document-level access control, enabling organizations t
21
21
| Approach | Description |
22
22
|----------|-------------|
23
23
| Security filters | String comparison. Your application passes in a user or group identity as a string, which populates a filter on a query, excluding any documents that don't match on the string. <br><br>Security filters are a technique for achieving document-level access control. This approach isn't bound to an API so you can use any version or package. |
24
-
| ACLs / RBAC scopes (preview) | Microsoft Entra ID security principal behind the query token is compared to the permission metadata of documents returned in search results, excluding any documents that don't match on permissions. <br><br>Built-in support for preserving Access Control Lists (ACLs) and Azure Data Lake Storage (ADLS) Gen2 Role-Based Access Control (RBAC) container scopes at the file level for security principals is in preview, available in REST APIs and prerelease Azure SDK packages that provide the feature. |
24
+
| ACLs / RBAC scopes (preview) | Microsoft Entra ID security principal behind the query token is compared to the permission metadata of documents returned in search results, excluding any documents that don't match on permissions. <br><br>Built-in support for identity-based access at the document level is in preview, available in REST APIs and prerelease Azure SDK packages that provide the feature. Be sure to check the [SDK package change log](#retrieve-permissions-metadata-during-data-ingestion-process) for evidence of feature support.|
25
25
26
26
## Pattern for security trimming using filters
27
27
28
-
For scenarios where native ACL/RBAC scopes integration isn't viable, we recommend security filters for trimming results based on exclusion criteria. The pattern includes the following components:
28
+
For scenarios where native ACL/RBAC scopes integration isn't viable, we recommend security string filters for trimming results based on exclusion criteria. The pattern includes the following components:
29
29
30
30
- Create a string field in the index to store strings of user or group identities.
31
31
- Load the index with source documents that include a field containing the identities.
32
32
- Include a filter expression in your query logic for matching on the string.
33
33
- At query time, get the identity of the caller.
34
34
- Pass in the identity of the caller as the filter string.
35
+
- Results are trimmed to exclude any matches that fail to include the user or group identity string,
35
36
36
37
You can use push or pull model APIs. Because this approach is API agnostic, you just need to ensure that the index and query have valid strings (identities) for the filtration step.
37
38
38
39
This approach is useful for systems with custom access models or non-Microsoft security frameworks. For more information this approach, see [Security filters for trimming results in Azure AI Search](search-security-trimming-for-azure-search.md).
39
40
40
41
## Pattern for native support for POSIX-like ACL and RBAC scope permissions (preview)
41
42
42
-
Native support is based on Microsoft Entra ID user and group access IDs affiliated with documents that you want to index and query. ADLS container RBAC scopes preservation at document level is also supported.
43
+
Native support is based on Microsoft Entra ID user and group access IDs affiliated with documents that you want to index and query.
43
44
44
-
For ACLs, we recommend group access IDs for ease of management. The pattern includes the following components:
45
+
Azure Data Lake Storage (ADLS) Gen2 containers support ACLs on the container and on files. For ADLS Gen2, RBAC scope preservation at document level is natively supported when you use the [ADLS Gen2 indexer](search-howto-index-azure-data-lake-storage.md) and a preview API to ingest content.
46
+
47
+
For any content that's secured through ACLs, we recommend group access IDs over user access IDs for ease of management. The pattern includes the following components:
45
48
46
49
- Start with documents or files that have ACL assignments.
47
50
-[Enable permission filters](/rest/api/searchservice/indexes/create-or-update?view=rest-searchservice-2025-05-01-preview&preserve-view=true#searchindexpermissionfilteroption) in the index.
48
51
-[Add a permission filter](/rest/api/searchservice/indexes/create-or-update?view=rest-searchservice-2025-05-01-preview&preserve-view=true#permissionfilter) to a string field in an index.
49
52
- Load the index with source documents having associated ACLs.
50
53
- Query the index, [adding `x-ms-query-source-authorization`](/rest/api/searchservice/documents/search-post?view=rest-searchservice-2025-05-01-preview&preserve-view=true#request-headers) in the request header.
51
54
52
-
You can use the push model API, pushing any JSON documents to the search index, where the payload includes a string field providing POSIX-like ACLs for each document.
55
+
You can use the push model API, pushing any JSON documents to the search index, where the payload includes a string field providing POSIX-like ACLs for each document. The important difference between this approach and security trimming is that the permission filter metadata in the index and query is recognized as Microsoft Entra ID authentication, whereas the security trimming workaround is simple string comparison. Also, you can use the Graph SDK to retrieve the identities.
53
56
54
-
Or, use the pull model (indexer) APIs if the data source is [Azure Data Lake Storage (ADLS) Gen2](/azure/storage/blobs/data-lake-storage-introduction).
57
+
You can also use the pull model (indexer) APIs if the data source is [Azure Data Lake Storage (ADLS) Gen2](/azure/storage/blobs/data-lake-storage-introduction) and your code calls a preview API for indexing.
55
58
56
59
### Retrieve permissions metadata during data ingestion process
0 commit comments