Skip to content

Azure AI Search document-level access control is excluded in search filter #1379

Open
@justjuuser

Description

@justjuuser

Describe the bug
Azure AI search permitted groups is not actually applied to the query filter. In backend settings.py file line 277 there permitted_groups_column property is declared

permitted_groups_column: Optional[str] = Field(default=None, exclude=True)

but it is marked as exclude=True, which means that it will not be used in the search filter

To Reproduce
Steps to reproduce the behavior:

  1. Go to Azure AI foundry Chat playground
  2. Click "Add your data" and select "Add a data source"
  3. Select properties related to your Azure AI search index
  4. On data management page tick "Enable document-level access control"
  5. Select column with Azure AD group ID-s
  6. Finish datasource setup
  7. Deploy website through Azure AI foundry Chat playground
  8. Try searching for materials you are not supposed to have access to
  9. Access control filter is not applied, GPT will output restricted documents

Expected behavior
Document-level access control is applied and restricted documents are included in search results.

Configuration: Please provide the following

  • Azure OpenAI model name and version gpt-4o version 2024-11-20
  • Is chat history enabled? No
  • Are you using data? If so, what data source? Azure AI Search

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions