Guides › Secure RAG › Restricted documents
Can Employees See Restricted Documents Through an AI Assistant?
Often, yes. Not by circumventing anything. An internal assistant built on retrieval will surface content an employee cannot open directly whenever the index was built with broader access than the person asking, which is the default configuration in most deployments.
How does that happen without an exploit?
The connector that builds the index authenticates as a service account with broad read scope, because that is the only practical way to index everything on a schedule. The index then contains the union of what all employees can see.
When someone queries the assistant, the retriever searches that union. Unless it re-checks the requesting person's entitlements at that moment, it returns the best semantic match regardless of who asked. The employee did nothing unusual. They asked a question and got an answer.
What does it look like in practice?
Someone asks about bonus structure and the answer reflects the actual compensation band table. Someone asks why a project slipped and the answer draws on a post-incident review restricted to the security team. Someone asks about headcount plans and the answer includes a reorganization that has not been announced.
In each case the assistant is behaving correctly by its own logic. There is no error, no alert, and usually no log entry that marks the moment as significant. The employee may not even realize they saw something restricted, because the answer arrives as prose rather than as a document with a classification banner.
Is this the AI's fault?
Mostly not. The underlying content was frequently over-shared long before the assistant existed. It sat in a SharePoint site with inherited permissions nobody reviewed, or a shared drive folder that was opened up once for a project and never closed.
What changed is discoverability. Finding a mislabeled file used to require knowing it existed and where to look. Semantic search removed that friction entirely, so the obscurity that was quietly acting as access control stopped working. The assistant did not create the exposure. It made it reachable in one sentence.
How do you find out whether yours does this?
The full method, including the prerequisite of retrieval logging, is set out in the RAG leakage self-test. Most teams get a usable answer in an afternoon, and the number is usually higher than expected.
What stops it?
Entitlements enforced per query against the person asking, applied as a filter before similarity search rather than after. Post-filtering, where the system retrieves first and discards afterward, still leaks through result counts and latency and degrades answer quality besides. The mechanics are in RAG permissions.
Alongside that, handling content at ingestion so the sensitive material in indexed documents is transformed before it becomes an embedding. That way an entitlement mistake costs less, because the chunk that leaked carries less.
What should you do if you find it already happened?
Treat it as a disclosure rather than a bug. Establish which documents were returned, to whom, and over what period, which requires retrieval logs. Involve counsel early if the content includes personal data, because notification duties can attach even though no system was breached in the conventional sense.
Frequently asked questions
Does this apply to Microsoft 365 Copilot and similar tools?
The same dynamic applies to any assistant retrieving over a corporate corpus, though products differ in how faithfully they honour source permissions. The question to ask any vendor is whether entitlements are evaluated per user at query time or captured at index time, and how quickly revocations propagate.
Would we see this in an access log?
Not in the source system's log, because the source system was accessed by the indexing service account, not by the employee. You would only see it in retrieval logs, if you keep them. That gap is why this goes undetected for long periods.
Is restricting the assistant to public documents a reasonable answer?
It is safe and usually leaves the assistant unable to answer the questions people actually have, which means adoption collapses or exceptions accumulate. Enforcing entitlements properly is more work and preserves the value.
How quickly do revoked permissions take effect?
As quickly as your index refreshes, which for many deployments is nightly. That leaves a window where someone who left the team, or the company, still matches chunks they can no longer open. Offboarding is the case worth testing first.
