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
Copy file name to clipboardExpand all lines: articles/search/search-document-level-access-overview.md
+26-20Lines changed: 26 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,29 +16,28 @@ ms.custom:
16
16
Azure AI Search supports document-level access control, enabling organizations to enforce fine-grained permissions at the document level, from data ingestion through query execution. This capability is essential for building secure AI agentic systems grounding data, Retrieval-Augmented Generation (RAG) applications, and enterprise search solutions that require authorization checks at the document level.
17
17
18
18
## Approaches for document-level access control
19
-
20
-
Built-in access control list (ACL) support for Microsoft Entra ID security principles is in preview, available through 2025-05-01-preview REST APIs and in prerelease Azure SDK packages that provide the feature.
21
-
22
-
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.
23
19
24
20
| Approach | Description |
25
21
|----------|-------------|
26
-
| 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. |
27
-
| ACLs (preview) | Security principle 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. |
22
+
| 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. |
23
+
| ACLs (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. |
24
+
25
+
> [!NOTE]
26
+
> Built-in access control list (ACL) support for principals is in preview, available in REST APIs and prerelease Azure SDK packages that provide the feature.
28
27
29
-
## Pattern for security trimming via filters
28
+
## Pattern for security trimming using filters
30
29
31
-
For scenarios where native ACL integration isn't supported, we recommend [security trimming using query filters](search-security-trimming-for-azure-search.md). The pattern includes the following components:
30
+
For scenarios where native ACL integration isn't viable, we recommend security filters for trimming results based on exclusion criteria that includes identity tokens. The pattern includes the following components:
32
31
33
32
- Create a string field in the index to store strings of user or group identities.
34
33
- Load the index with source documents that include a field containing the identities.
35
34
- Include a filter expression in your query logic for matching on the string.
36
35
- At query time, get the identity of the caller.
37
36
- Pass in the identity of the caller as the filter string.
38
37
39
-
You can use push or pull model APIs. Because this approach is API agnostic, you just need to ensure that the index and query has valid strings for the filtration step.
38
+
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 for the filtration step.
40
39
41
-
This approach is useful for systems with custom access models or non-Microsoft Entra-based security frameworks. For more information this approach, see [Security filters for trimming results in Azure AI Search](search-security-trimming-for-azure-search.md).
40
+
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).
42
41
43
42
## Pattern for native support for POSIX-like ACL permissions (preview)
44
43
@@ -57,21 +56,25 @@ Or, use the pull model (indexer) APIs if the data source is [Azure Data Lake Sto
57
56
### Retrieve permissions metadata during data ingestion process
58
57
59
58
How you retrieve permissions varies depending on whether you're pushing a documents payload or using the ADLS Gen2 indexer.
60
-
61
-
For the [push model approach](search-index-access-control-lists-and-rbac-push-api.md):
62
59
63
-
1. Use the [2025-05-01 preview REST API](/rest/api/searchservice/documents/?view=rest-searchservice-2025-05-01-preview&preserve-view=true#indexdocumentsresult) or prerelease Azure SDK packages for [Python](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/search/azure-search-documents/CHANGELOG.md#1160b12-2025-05-14), [.NET](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/CHANGELOG.md#1170-beta4-2025-05-14), or [Java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/search/azure-search-documents/CHANGELOG.md#1180-beta7-2025-05-16) to push documents and their associated permission metadata into the search index.
60
+
Start with a preview API that provides the feature:
64
61
65
-
1. Consider using the Microsoft Graph SDK to get group or user IDs.
-[Azure SDK for Python prerelease package](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/search/azure-search-documents/CHANGELOG.md#1160b12-2025-05-14)
64
+
-[Azure SDK for .NET prerelease package](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/CHANGELOG.md#1170-beta4-2025-05-14)
65
+
-[Azure SDK for Java prerelease package](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/search/azure-search-documents/CHANGELOG.md#1180-beta7-2025-05-16)
66
+
67
+
For the [push model approach](search-index-access-control-lists-and-rbac-push-api.md):
66
68
67
69
1. Ensure your index schema is also created with a preview or prerelease SDK and that the schema has permission filters.
70
+
1. Consider using the Microsoft Graph SDK to get group or user IDs.
71
+
1. Use the [Index Documents](/rest/api/searchservice/documents/?view=rest-searchservice-2025-05-01-preview&preserve-view=true#indexdocumentsresult) or equivalent Azure SDK API to push documents and their associated permission metadata into the search index.
68
72
69
73
For the [pull model ADLS Gen2 indexer approach](search-indexer-access-control-lists-and-role-based-access.md):
70
74
71
-
1. Use the [2025-05-01 preview REST API](/rest/api/searchservice/documents/?view=rest-searchservice-2025-05-01-preview&preserve-view=true#indexdocumentsresult) or prerelease Azure SDK packages for [Python](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/search/azure-search-documents/CHANGELOG.md#1160b12-2025-05-14), [.NET](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/CHANGELOG.md#1170-beta4-2025-05-14), or [Java](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/search/azure-search-documents/CHANGELOG.md#1180-beta7-2025-05-16) to create the indexer, index, and data source.
72
-
73
75
1. Verify that files in the directory are secured using the [ADLS Gen2 access control model](/azure/storage/blobs/data-lake-storage-access-control-model).
74
-
76
+
1. Use the [Create Indexer](/rest/api/searchservice/indexers/create?view=rest-searchservice-2025-05-01-preview&preserve-view=true) or equivalent Azure SDK API to create the indexer, index, and data source.
77
+
75
78
### Enforce document-level permissions at query time
76
79
77
80
With native [token-based querying](https://aka.ms/azs-query-preserving-permissions), Azure AI Search validates a user's [Microsoft Entra token](/Entra/identity/devices/concept-tokens-microsoft-Entra-id), trimming result sets to include only documents the user is authorized to access.
@@ -90,10 +93,13 @@ Document-level permissions in Azure AI Search provide a structured framework for
90
93
91
94
Take a closer look at document-level access control in Azure AI Search with more articles and samples.
92
95
93
-
-[How to index document-level permissions using push API](search-index-access-control-lists-and-rbac-push-api.md)
94
-
-[How to index document-level permissions using the ADLS Gen2 indexer](search-indexer-access-control-lists-and-role-based-access.md)
95
-
-[How to query using Microsoft Entra token-based permissions](https://aka.ms/azs-query-preserving-permissions)
96
96
-[Tutorial: Index ADLS Gen2 permissions metadata using an indexer](tutorial-adls-gen2-indexer-acls.md)
0 commit comments