Preventing Copilot Studio Knowledge Sources from Retrieving Restricted Client Documents
Restricted client documents reach an agent response when retrieval runs with more access than the end user holds, when source scope is wider than the agent's purpose, or when labels and policies are applied inconsistently. Prevent this with layered controls: authenticate users, make retrieval honor each user's document permissions, narrow knowledge sources, label sensitive content, apply DLP and data policies, then test before and after publishing. Enforcing policy at runtime on interactions and tool calls covers what those controls leave open.
Verify before and after publishing
- 1
Build a test set
Create or designate restricted client documents with known, narrow access, plus non-restricted documents on the same topics.
- 2
Test with differentiated accounts
Use one account with access and several without: a different team, a guest or external user, and an unauthenticated session if the channel allows it.
- 3
Probe with direct and indirect prompts
Ask for the document by name, then ask topical questions that would only be answerable from its contents. Check both citations and paraphrased content.
- 4
Test every published channel
Repeat the tests on each channel the agent is published to, not only in the authoring test pane.
- 5
Review available evidence
Check what the platform records about retrieval and access decisions for each test, and note which questions it cannot answer, such as which document drove a specific sentence.
- 6
Re-run on change
Treat source additions, permission changes, label policy updates and republishing as triggers to repeat the tests.
Apply layered controls in retrieval order
Require user authentication
Decide which agents may run without knowing the user. Any agent that touches client documents should identify the user, because document-level restrictions cannot be applied to an anonymous caller. Review channel configuration too, since a published channel can offer a different authentication path than the one you tested.
Retrieve as the user, not as a shared identity
For each knowledge source type, determine whether content is retrieved with the end user's permissions or with a connection or service account. Replace broad service identities with user-level enforcement wherever client documents are involved.
Scope sources to the agent's purpose
Point the agent at specific libraries, tables or files rather than whole sites or repositories. Separate client-restricted material from general knowledge so that one agent does not span both.
Fix oversharing at the source
Review sharing links, broad group grants and inherited permissions on the content the agent can reach. Retrieval inherits the source's permission mistakes.
Label sensitive content consistently
Apply sensitivity labels to client documents and confirm that the labels are present on the files each knowledge source indexes. Unlabeled copies and uploaded files are the usual gap.
Apply DLP and data policies
Use DLP and data policies to restrict which connectors and data sources agents may combine, and to limit where content can flow. These govern connections and movement, so they complement document permissions rather than replace them.
Where restricted documents can be exposed
A Copilot Studio agent grounds its answers on knowledge sources such as SharePoint, Dataverse, uploaded files and connectors. Each source adds a point where an access decision is made, or should be made. A restricted client document is exposed when any one of those decisions is wrong, because the agent will summarize whatever retrieval hands it.
Four failure patterns account for most cases. First, overshared content: a document is technically readable by a broad group, so retrieval treats it as fair game even though the business never intended it. Second, broad service identities: if a source is queried with a shared or elevated identity rather than the end user's, document-level restrictions no longer apply to the person asking. Third, authentication settings: an agent that does not establish who the user is cannot apply user-level restrictions at all. Fourth, inconsistent label handling: a sensitivity label only helps if every stage of retrieval and response honors it.
This maps to a general principle in FTC and NIST guidance: not everyone needs unrestricted access to stored information, and access should be limited to authorized users. An agent is another consumer of that data, and it should be held to the same rule as a person.
Residual gaps to plan for
Even a well-configured agent leaves gaps that configuration alone does not close. Permissions describe who may open a document, not whether a particular answer is appropriate. An authorized user can still ask a question whose response combines content in a way that exposes more than intended, or paste restricted details into a prompt.
Uploaded files deserve separate attention. They sit outside the permission model of the repository they came from, so a file uploaded as a knowledge source is available to the agent on the agent's terms, not the original repository's. The same applies to any copy of a restricted document placed in a less controlled location.
Label and policy coverage is also uneven in practice. Content created before labeling was introduced, content in connectors that do not carry labels, and documents moved between systems can all escape the controls you assume are in place. Finally, change is constant. A permission edit, a new knowledge source or a channel change after publishing can alter exposure without anyone revisiting the original review.
Attribute-based conditions, such as time of day or point of origin, are recognized in NIST guidance as ways to restrict access. Whether a given retrieval path supports them should be tested rather than assumed.
Enforcing policy at runtime and producing evidence
Configuration controls decide what an agent can reach. They do not decide, interaction by interaction, what is allowed to leave in a response or pass through a tool call. That is the gap runtime enforcement addresses.
Trussed enforces policy in the execution path across models, agents, tools and MCP servers. Its scope is individual interactions and tool calls. Policy is enforced at runtime, not reviewed after the fact, with outcomes such as allow, redact or block. For restricted client content, that means a response or tool call containing material that policy prohibits can be redacted or blocked before it is delivered, even where an upstream permission or label did not stop it.
Each enforcement decision produces audit-ready evidence of what was allowed, redacted or blocked. This answers a question native configuration review often cannot: what actually happened on a given interaction. Trussed supports self-managed deployment in the customer cloud, with configurable retention and data residency, and is used by regulated enterprises in insurance, pharma, healthcare and education.
Runtime enforcement complements source permissions, authentication and labels. It is not a substitute for fixing oversharing or for scoping knowledge sources correctly.
Retrieval path and where access decisions occur
Label: 1. Source configuration
Description: Which repositories, files and connectors the agent can ground on.
Label: 2. User authentication
Description: Whether the agent knows who is asking.
Label: 3. Permission enforcement
Description: Whether retrieval uses the user's access or a broader identity.
Label: 4. Labels and policies
Description: Sensitivity labels, DLP and data policies applied to content and connections.
Label: 5. Response
Description: What the agent surfaces, and the evidence of what was allowed or blocked.
Close the gap between configuration and what the agent does
Talk through your retrieval path and see how enforcement on interactions and tool calls produces audit-ready evidence.
Talk to an ExpertHow does your AI governance program compare?
See where your program has gaps in less than 2 minutes.