To integrate Azure Data Lake Gen2 ACL-based access in Azure AI Search for secure indexing, you can use the following steps:
- Set up Azure Data Lake Gen2: Configure the storage account with hierarchical namespace enabled and proper ACLs for access control.
- Grant Azure AI Search access: Assign a role (e.g., Storage Blob Data Reader) to Azure Cognitive Search's managed identity on the Data Lake Gen2 container.
- Configure Data Source in Azure Search: Use the Data Lake Gen2 URI with authentication via a managed identity.
Here is the code snippet you can refer to:

In the above code, we are using the following:
- Secure Indexing: Azure Search uses the managed identity to respect ACLs defined on the Data Lake Gen2 files.
- Data Source Configuration: Ensure the connection string or managed identity is correctly specified for the Data Source in Azure AI Search.
Hence, by using the following, you can integrate Data Lake Gen2 ACL-based access in Azure AI Search for secure indexing.