The short answer

Protect enterprise knowledge retrieval with permission checks before content reaches the model. Preserve source permissions on document fragments, define how access changes reach the index, and include cached answers in revocation tests. Agree what the service does when it cannot establish current access.

At a glance

  • Enforce reader permissions before retrieved material reaches the model.
  • Agree and test how source permission changes reach indexes and cached answers.
  • Demonstrate denied access as well as useful answers, using synthetic documents.

The project ended. The answer still arrived.

On Monday, a colleague moves from the tender team to another project. Their access to the tender folder is removed. On Tuesday, they ask the internal assistant about the proposed price and get a detailed answer. This is a fictional procurement team, not a reported client incident. The folder may be correctly protected while the search index still holds a usable copy. Before connecting more company documents to an assistant, ask a precise question: when access changes at the source, what stops the next answer from using the old permission?

Check access before building the answer

Retrieval-augmented generation, usually shortened to RAG, supplies an AI model with relevant material found by a search system. OWASP recommends carrying access metadata onto each document fragment and enforcing permission checks during retrieval, before content reaches the model. Checking only when a document is imported misses later changes. Our suggested first deliverable is an access map: identify the source, its owner, the reader identity and every derived copy used to answer. Ask the engineer to trace one restricted paragraph through that map. A reassuring instruction telling the model to keep secrets is no substitute for excluding material the reader cannot access.[1]

Choose the enforcement route deliberately

Microsoft documents several enforcement routes in Azure AI Search. Its current overview identifies SharePoint ACL ingestion and query-time permission filtering, ADLS Gen2 ACL/RBAC, standard Blob container RBAC and push ACL ingestion as generally available with the 2026-10-01 data plane API; Microsoft Purview sensitivity label enforcement remains in preview. Treat the supported route and API version as procurement questions, rather than assuming every connector preserves every permission. Who supplies the trusted reader identity? Which permission relationships are supported for the actual source? We would require those answers against the chosen product version before approving an implementation. A feature called document security still needs a tested agreement with the source system.[2]

Give permission changes a deadline

For our fictional tender team, we would write a specific operating promise: after removal from the project, the person must lose retrieval access within a period agreed with the information owner. That period is a proposed service requirement, not an industry-wide safe interval. Ask what updates the index, how failures are detected and what the service does while permission freshness is uncertain. OWASP recommends denying access by default and validating permission on every request. Our design preference for sensitive material is to stop the affected retrieval when access cannot be established, with a useful message and an owner for investigation. A scheduled refresh alone does not demonstrate that this promise has been met.[3]

Test the answer already in the cache

Test the remembered answer too. OWASP warns that response caches can retain information after source permissions change; it recommends permission-aware cache isolation and invalidation. In our example, first ask an authorised test account about a synthetic tender and let the answer be cached. Remove that account from the permitted group, then repeat the question through the same session and a new one. Ask another account with different permissions as well. We would inspect retrieved fragment IDs and cache decisions without copying sensitive document text into routine logs. Disabling a document link is insufficient if the answer itself still reveals the restricted price.[1]

Make the handover demonstrate a refusal

Finish the handover with an acceptance sheet the information owner can read. We would include an allowed reader, a never-authorised reader, a revoked reader, a deleted source and an unavailable permission service. Use synthetic documents and approved test identities. Record the source change, when each access path stopped returning the test material, unresolved exceptions and the person responsible for them. Repeat after connector or identity changes. These checks cannot retract an answer someone already received, or prove every permission combination is covered. They can establish whether the next retrieval obeys the tested boundary. That is a more useful buying criterion than how many folders the assistant can ingest.

Sources and further reading

  1. OWASP — RAG Security Cheat Sheet: sections 4 and 11, permission inheritance and caching ↗
  2. Microsoft — Azure AI Search document-level access: supported approaches and API availability ↗
  3. OWASP — Authorization Cheat Sheet: deny by default and validate every request ↗

Put the perspective into practice.

Explore Artificial Intelligence & Intelligent Systems