Share via

Copilot Studio to Microsoft Teams as Source Knowledge Availability

M. Farid Retistianto 0 Reputation points
2026-04-07T07:59:18.8+00:00

Hej,

I am currently building a declarative agent using Copilot Studio. I have license in Microsoft 365 Copilot and I managed to make my agent works with both my dedicated SharePoint and Confluence (meaning that my agent was able to follow my instructions and retrieve what we are inquiring and point the right sources in both SharePoint and Confluence).

Now, we want the agent to also access my Teams Channel and messages. Referring to this link Add knowledge sources to your declarative agent - Teams Messages, it points out how to do so in Agent Builder and VS Code, however it seems that Teams are not 'visible' to be picked as the source in Copilot Studio.

We tested three scenarios using the same prompt to retrieve a Teams message that we are sure it is there. With agent from Agent Builder (with Teams access), the Copilot Chat from Web (directly use since we know the license enable us to access Teams directly), and the agent built from Copilot Studio. Only the one from Copilot Studio did not manage to retrieve the desired (stating it does not have access).

Our issue is quite similar to this thread Co-Pilot - Adding Teams as a source knowledge is not available as we understood that there are several documented issues listed and suggestions to check.

One observation that we think it's quite interesting is that in Copilot Studio, you can add a tool called Work IQ Teams (Preview). Utilizing this seems to at least enable our agent to perform to what we want (to retrieve the chat in specific channel within the scope of the user). However, seeing that it is in Preview stage, we are not sure how would this tool would be in the future.

Would there be any recommendations on how to proceed? Or perhaps are there something else that we are missing? Thank you.

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-07T07:59:46.4166667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Teams messages can be added as a knowledge source for declarative agents, but the mechanism differs between Microsoft 365 Copilot “Agent Builder”/Agents Toolkit and Copilot Studio.

    From the provided information, Teams messages are supported as a knowledge source for declarative agents via the TeamsMessages capability in the declarative agent manifest (or TypeSpec) and via the Knowledge configuration in Microsoft 365 Copilot/Agents Toolkit, not via Copilot Studio’s current knowledge source picker.

    Key points from the documented behavior:

    1. Where Teams messages are supported as knowledge
      • In Microsoft 365 Copilot “Agent Builder” (Configure → Knowledge → My Teams chats and meetings or specific chats).
      • In declarative agents built with Microsoft 365 Agents Toolkit (VS Code / TypeSpec) by adding the TeamsMessages capability in the manifest or TypeSpec.
    2. How Teams messages are configured in declarative agents
      • Manifest-based configuration (Agents Toolkit):
             {
               "capabilities": [
                 {
                   "name": "TeamsMessages",
                   "urls": [
                     {
                       "url": "https://teams.microsoft.com/l/team/..."
                     }
                   ]
                 }
               ]
             }
        
        • Using TeamsMessages without urls makes all Teams channels, meetings, 1:1, and group chats available to the agent for the signed-in user.
        • Using urls scopes the agent to up to five specific Teams resources (channels, group/1:1 chats, or meeting chats).
      • TypeSpec configuration (Agents Toolkit):
             namespace MyAgent {
               op teamsMessages is AgentCapabilities.TeamsMessages<TeamsMessagesByUrl = [
                 {
                   url: "https://teams.microsoft.com/l/team/...",
                 }
               ]>;
             }
        
        • Omitting TeamsMessagesByUrl has the same effect as omitting urls in the manifest: all accessible chats and meetings are available.
    3. Getting correct Teams URLs for scoping
      • Channel or team: use Get link to channel in Teams.
      • Meeting: open the meeting → arrow next to JoinCopy join link.
      • Group or 1:1 chat: must use a deep link with chatId:
        1. In Teams, go to a message in the chat → ...Copy link.
        2. From the copied URL, extract the segment between chat/ and the next / (usually starts with 19:). This is the chatId.
        3. Build the deep link:
          https://teams.microsoft.com/l/chat/<chatId>/conversations.
      • These URLs are then used in the urls array (manifest) or TeamsMessagesByUrl (TypeSpec).
    4. Licensing and access requirements
      • Teams messages as a knowledge source require a Microsoft 365 Copilot license for the user.
      • The agent can only retrieve Teams content that the signed-in user has permission to access.
    5. Why Copilot Studio behaves differently
      • The documentation and examples for Teams messages as a knowledge source are tied to declarative agents in Microsoft 365 Copilot and Agents Toolkit, not Copilot Studio’s current knowledge configuration UI.
      • Copilot Studio’s “Work IQ Teams (Preview)” tool is a separate capability that can query Teams, but it is explicitly in Preview, and its long-term behavior or GA path is not defined in the provided material.
    6. Recommended way forward based on the documented capabilities
      • For a declarative agent that must reliably use Teams messages as knowledge:
        1. Build and configure the agent using Microsoft 365 Agents Toolkit (VS Code / TypeSpec) or the Agent Builder experience where TeamsMessages is officially supported.
        2. Add the TeamsMessages capability in the manifest or TypeSpec, and scope it with the appropriate Teams URLs or omit URLs to use all accessible chats.
        3. Ensure all intended users have the required Microsoft 365 Copilot license and Teams permissions.
      • Copilot Studio can still be used for other knowledge sources (SharePoint, connectors, etc.), but for Teams messages, the supported path in the documentation is via declarative agents + Agents Toolkit/Agent Builder, not via Copilot Studio’s knowledge picker.

    Given the documentation, relying on TeamsMessages in the declarative agent manifest/TypeSpec is the supported and forward-compatible approach. The “Work IQ Teams (Preview)” tool can be used experimentally, but for production scenarios and predictable behavior, configuring Teams messages via the declarative agent capabilities is the recommended path.


    References:


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.