Copilot agent in Teams lose access to KB source

GIQUIAUD, Fabien 5 Reputation points
2025-12-03T09:50:25.3666667+00:00

Hello everyone,

I created an agent in Copilot Studio. Its knowledge source is documents stored on a SharePoint site. I deployed this agent in Teams.

When I first use the agent in Teams, it asked me to authorize access to the SharePoint site, and then everything works fine. The answers are correct, etc. The next day, when I want to use the agent, it's unable to answer any of my questions. It's like my user had lost access to the knowledge source (which is not the case)

The purpose of this agent is to deploy it within the company so that users can obtain information. I can't really ask them to reset the Teams cache or uninstall/reinstall it every time.

Is this a known issue? And is there a way to work around this problem?

Kind regards

Microsoft Copilot | Other
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Nivedipa-MSFT 3,946 Reputation points Microsoft External Staff Moderator
    2025-12-04T06:33:40.67+00:00

    @GIQUIAUD, Fabien - Thanks for bringing this issue to our attention.
    Copilot Studio agents that use SharePoint knowledge sources currently lose authentication after the initial use in Teams. As a result, users need to re-authorize daily, which poses challenges for enterprise deployment.

    The main reasons for this issue are:

    • SharePoint access tokens expire after one hour
    • The Teams client may cache stale tokens
    • Authentication refresh between Copilot Studio, Teams, and SharePoint can fail

    Here are some quick workarounds:

    1. Opt for app-only authentication rather than delegated user permissions.
    2. Set up explicit SharePoint permissions for the Copilot Studio service principal.
    3. Consider switching to Microsoft 365 Copilot Agents (declarative agents) for improved SharePoint integration.
    4. For greater production control, implement a Custom Engine Agent that makes direct SharePoint API calls.

    For an enterprise solution, it’s recommended to build a Custom Engine Agent using the Teams AI SDK, ensuring proper token management and robust retry logic.

    Reference Documents:
    https://v4.hkg1.meaqua.org/en-us/microsoft-copilot-studio/knowledge-copilot-studio
    https://v4.hkg1.meaqua.org/en-us/microsoft-copilot-studio/configuration-end-user-authentication


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.