Benchmark your AI security readiness for 2027 → [Take the survey]

Benchmark your AI security readiness for 2027 → [Take the survey]

Benchmark your AI security readiness for 2027 → [Take the survey]

//Question

How Do We Prevent Internal AI Assistants from Exposing Unauthorized Documents or Customer Data?

Posted on 20th November, 2026

Harry

Harry

//Answer

Enforce permissions before data reaches the model, not after it answers. An assistant should only ever see what the person asking is allowed to see. Each control belongs at a specific layer:

Layer

What belongs here

What goes wrong without it

User identity and permissions

SSO, roles, attributes and resource entitlements

The assistant can’t tell who is asking or what they’re entitled to

Permission-aware retrieval

Filtering documents by the requesting user’s permissions before they enter the model’s context

Restricted content reaches the model, and any clever prompt can surface it

AI agent and tool execution

Rechecking the user’s permissions before every sensitive action or data lookup

The agent uses its own broad access on behalf of a user who has none

Runtime inspection and output controls

Detecting risky disclosures, enforcing policies and keeping audit evidence

Mistakes in the layers above go unnoticed, with no record for investigation

Two rules prevent most leaks:

  • Retrieve as the user, not as the assistant. The most common failure is an assistant that indexes or searches with a service account that can see everything. Pass the user’s identity through to retrieval and tools, so existing document permissions still apply.

  • Treat output controls as the last line, not the first. If restricted data reaches the model, output filtering may catch some of it, but the model has already seen it. Permission-aware retrieval is the real control.

Then test the setup the way an attacker would:

  • Sign in as a low-privilege user and ask for a document you know they can’t access.

  • Plant an instruction in a shared document asking the assistant to reveal customer records.

  • Confirm both attempts fail, and that the attempts appear in your audit logs.

Akto can be added as a testing and runtime-control layer on top of these controls. It doesn’t replace your identity provider, document permissions or permission-aware retrieval. Akto Argus red teams internally built assistants for data leakage, prompt injection and privilege escalation. At runtime, Akto’s guardrails detect and can block or redact sensitive data such as personal, health and financial information. They also allow or deny tool calls by agent, tool and resource, and keep an audit trail. For Microsoft 365 Copilot, Akto Atlas adds real-time prompt controls and audit records.

Permissions decide what the assistant can see. Runtime controls confirm it stayed inside them.

Comments