Part 2 – Build & Ship a “Docs Agent” to Microsoft Teams

(Companion guide to “Spin-Up the Microsoft Learn MCP Server”)

Start with Microsoft Learn MCP setup in Copilot Studio. A custom connector is no longer required for that setup. This continuation uses screenshots from the original walkthrough; consult Microsoft’s current Teams publishing guidance for the current controls and availability options.

What you’ll build

A Copilot Studio agent that queries the Microsoft Learn MCP server for live docs, then answers teammates inside a Teams chat or Meeting.

Prerequisites

NeedNotes
Microsoft Learn MCP tool configured in the agentFollow the linked Part 1 setup and confirm the agent can use the tool before continuing.
Access to Copilot StudioUse the current setup guidance for your agent experience. The screenshots below show the original interface.
Teams admin rights (or approval from your Teams Admin)For organization-wide distribution, coordinate with your Teams administrator and follow the current approval requirements.
Licensing and capacityCheck the current Copilot Studio licensing requirements for your scenario with your administrator.
prereq table

Icons to Download (optional)

Below are icons you can use for the Agent and the MCP custom connector.

1 – Create the Agent in Copilot Studio

In this example I am going to use the existing agent I created from Part 1.

  1. Modify or create the agent with a meaningful name, description, and icon.
    (You can use the one I provided from above or use your own)
  2. Name: MS Docs Agent
  3. Description: MS Docs Agent is your on-demand mentor for Microsoft technologies—built with Copilot Studio and powered by the Microsoft Learn MCP server. Every answer comes from the live, authoritative docs that Microsoft publishes each day, so you never rely on stale model memories or web-scraped content.
  4. Orchestration = Enabled
    MS Docs Agent details with its name, description and generative orchestration enabled.
  5. Configure instructions using the current Microsoft Learn MCP setup guidance linked above. The blank-instructions advice in the original walkthrough reflected that earlier setup; it should not be treated as a requirement now.
  6. Web Search – This should be Disabled. We only want the agent to query the docs which it does through the MCP server.
  7. Knowledge should be empty, the only thing we want this agent to do is query the Docs MCP server, so this should be the only Tool that the agent has access to.
  8. For this focused example, use the Microsoft Learn MCP tool configured in Part 1. The screenshot below shows the original connector setup.
    Agent overview with empty Instructions and Knowledge sections, Web Search disabled, and Invoke Microsoft Docs MCP server listed under Tools.

Add Suggested Prompts

When users interact with the agent in M365 chat (Copilot) we can show suggested prompts to help guide the user in what is possible with this agent. Here are a bunch of samples you can give your agent:

TitlePrompt
Dev Env for Power AppsSet up a developer environment for Power Apps—step-by-step.
Rollup vs FormulaRollup fields vs Formula columns in Dataverse—when to use each?
Flow 502 FixPower Automate flow fails with 502 Bad Gateway—how do I resolve it?
Cert Path FinderFastest certification path for a Dynamics 365 functional consultant.
PL-200 Module ListList every Microsoft Learn module covered by the PL-200 exam.
Managed Env EnableTurn on managed environments and approval gates in Power Platform.
Finance DLP PolicyBest-practice DLP setup for finance data in Power Platform.
Power Fx Date FilterSample Power Fx to filter a gallery to today’s records.
OpenAI Flow SampleMinimal example: call Azure OpenAI from Power Automate.
Secure Env VarsSecure environment variables with Azure Key Vault in flows.
Pipeline ChecklistChecklist to deploy a solution through Power Platform pipelines.
PCF Chart ControlBuild a PCF control that renders a chart on a model-driven form.
New PA FeaturesSummarize new Power Apps features announced this month.
Preview ConnectorsList preview connectors added to Power Automate in the last 30 days.
Explain to a ChildExplain Dataverse to a five-year-old.

You can only add 6 Suggested Prompts. So choose carefully.

Six suggested prompts covering managed environments, secure variables, new features, preview connectors, Dataverse explanations and rollup versus formula columns.

Agent Settings

Next we want to configure some settings on the agent.

  1. Click the Settings button on the top right.
    Settings button highlighted beside Publish in Copilot Studio.
  2. (Optional) If you want the agent to have reasoning capabilities > Under Generative AI turn on: Deep reasoning
    **Note that this is a premium feature**
    Deep reasoning preview switch set to On, with a Premium label.
  3. Scroll down to Knowledge, make sure Use general knowledge and Use information from the Web are both OFF
    Knowledge settings with Use general knowledge and Use information from the Web both switched Off.
  4. Make sure to click Save once done.

Turn Off Pointless Topics

Next we will turn off the topics we don’t want the agent to use.

  1. Click on Topics tab > Under Custom > Only leave Start Over topic On.
    Custom topics list with Start Over enabled and Goodbye, Greeting and Thank you disabled.
  2. Under System > Turn Off:
    – End of Conversation
    – Escalate
    – Fallback
    – Multiple Topics Matched
    System topics list with End of Conversation, Escalate, Fallback and Multiple Topics Matched disabled.
  3. Next, lets modify the Conversation Start to make it sound better.
    Click Conversation Start topic > Modify the Message node:
    Conversation Start topic with a welcome Message node using Bot.Name and inviting Microsoft technology questions.
  4. Click Save.

Now we are ready to Publish and Package for Teams!

Publish & Package for Teams

Next we need to Publish our agent.

  1. Click on the Channels tab > Click Publish
    Channels tab and Publish button highlighted while the agent status is Not published.
  2. Once your agent is published > Click on the Teams and Microsoft 365 Copilot channel.
    Teams and Microsoft 365 Copilot tile under Microsoft channels.
  3. A sidebar opens > Check the Make agent available in Microsoft 365 Copilot > Click Add channel.
    Teams channel setup with Make agent available in Microsoft 365 Copilot checked and Add channel highlighted.
  4. After the channel has been added > Click Edit details.
    Edit details button highlighted in the Teams and Microsoft 365 Copilot channel preview.
  5. This is where we configure the agent in Teams. We will modify the icon, give a short description, long description and allow for the agent to be added to a team and meeting chats.
    Under Teams settings > Check both:
    – Users can add this agent to a team
    – Use this agent for group and meeting chats
    Agent details with Users can add this agent to a team and Use this agent for group and meeting chats both checked.
  6. Click Save

Submit Agent for Approval

Now because we want our organization to easily find and use this agent. We will submit the agent to the Agent Store. To do this follow these steps:

  1. First Publish your agent, to make sure you have the newest version you are pushing to Teams admin for approval.
  2. Next click on the Channels tab > Select the Teams and Microsoft 365 Copilot channel.
  3. Now click Availability options.
    Availability options button highlighted below the agent preview in the Teams channel.
  4. Now we will configure the Show to everyone in my org.
    Availability options with Show to everyone in my org highlighted under Show in the store.
  5. Than click Submit for admin approval.
    Show in Teams app store for org panel with Submit for admin approval highlighted.
    Now we will look at what a Teams Admin has to do.

Approve Agent App (As a Teams Admin)

A Microsoft Teams Admin will have to approve the Agent app before your org can use it. As a Teams Admin follow these steps:

  1. Navigate to https://admin.teams.microsoft.com/policies/manage-apps
    (Click on Manage apps under Teams apps)
  2. Search for your agent name in the search bar
    Teams admin center Manage apps search for MS Docs, showing MS Docs Agent with Blocked app status and Submitted publishing status.
  3. Click the agent > Publish.
    MS Docs Agent page in Teams admin center with the Publish button highlighted and Pending action shown.
  4. Approval depends on what changes. Microsoft’s Teams publishing guidance distinguishes agent-detail changes, such as the icon and descriptions, from content updates. Check the current approval requirements before resubmitting an already approved agent.

How to Use the Agent

Once your agent is approved by an Admin. You can easily find it in the Agent Store. Another easy way to get to your agent is to open it from Copilot Studio:

  1. Click Channels tab > Select Teams and Microsoft 365 Copilot channel > Click See agent in Teams.
See agent in Teams link highlighted in the Teams and Microsoft 365 Copilot channel.

You will be brought to Teams with the agent open. You can now add it:

MS Docs Agent app details in Teams with the Add button highlighted.

Adding Agent to a Meeting or Chat

There are a few ways to add the agent to a meeting. One easy way is to @mention the agent in the chat.

Teams chat suggestions show MS Docs Agent after typing @MS in the message box.

**Note to start typing the name of the agent, and it should show up**

Teams conversation with MS Docs Agent answering a Workday connector question and linking to connector details.

Troubleshooting

There are a few things to note that I ran into:
1) If your getting an error on the MCP Server, remove all custom instructions

2) Sometimes your agents details can be cached and showing old metadata. In this case you can resubmit the app approval.

3) Always test the Agent inside Copilot Studio Test Pane with tracking topics and Activity Map turned On.

Browse all articles

Comments

One response to “Part 2 – Build & Ship a “Docs Agent” to Microsoft Teams”

  1. […] to make this available in Teams? Continue with the docs-agent publishing walkthrough. That article includes screenshots from the original setup, so check its current-guidance note […]

Leave a Reply

Discover more from Flow Alt Delete

Subscribe now to keep reading and get access to the full archive.

Continue reading