Forum Discussion

RishabhSingh's avatar
RishabhSingh
Copper Contributor
Sep 24, 2026

Copilot Agent not consistently Respecting SharePoint Document Permission

Hi everyone,

I have created a Copilot agent that answers questions based on documents stored in SharePoint, and I want the agent to respect the user's SharePoint permissions.

For example:

  • I have two documents: Document A and Document B.
  • User A has access to Document A but does not have access to Document B.
  • When User A asks a question related to Document A, the agent should provide an answer.
  • When User A asks a question related to Document B, the agent should not provide any information because User A does not have permission to access that document in SharePoint.

However, I am experiencing inconsistent behavior.

Sometimes the Copilot agent correctly respects the SharePoint permissions, but at other times it provides an answer from a document that the user does not have access to in SharePoint. In some cases, even users who do have access to a document do not receive an answer from it.

I am using Microsoft authentication and SharePoint as the knowledge source.

Has anyone experienced this issue with Copilot Studio and SharePoint security trimming?

Could this be related to indexing, caching, authentication, permissions propagation, or the way the agent retrieves documents?

I would appreciate any guidance on how to ensure that the Copilot agent consistently respects the user's SharePoint permissions when retrieving and answering from documents.

2 Replies

  • Your two symptoms actually point in different directions, and Microsoft's troubleshooting documentation for exactly this setup covers both.

     

    The silent part is by design: Copilot Studio respects Microsoft 365 security trimming, and when a user doesn't have read permission on a site or file, the search simply returns no results — no error, no 'you don't have access' message. So a user who should get nothing getting nothing is the system working. The other direction — a user without access getting an answer — is the one to chase, and the doc's first checks are worth doing exactly as written: have the affected user open the document directly in SharePoint to confirm they really can't, then run the same question as that same user in Microsoft 365 Copilot Chat. If Copilot Chat answers correctly and your agent doesn't, the problem is in the agent's configuration, not the permissions.

     

    The inconsistency over time is the other thing the doc explains well: the agent searches SharePoint's index, and only the top three results get used to build an answer. So a document someone can open still won't produce an answer if it isn't in those top three, or if it was uploaded or changed recently and the index hasn't caught up yet. For an urgent case, a SharePoint site admin can trigger a re-index of the site.

     

    Two more things to check from the same doc: whether you're using the agent-level knowledge source or a 'Create generative answers' node in a topic, because the two paths are set up differently — the node has a 'Search only selected sources' toggle that can silently exclude a source, and the agent-level source has filter conditions on title, author or modified date that can do the same. And if either document is protected by a sensitivity label, DKE or a password, the agent-level source will respect that trimming too, but it can look like the document simply isn't there.

     

    If the leak still reproduces after those checks — the same user, in the published agent, getting content from a document they definitely can't open in SharePoint — that's the point to raise with support, because per the docs the trimming should have hidden it.