Extend bot-based message extension as plugin for Microsoft 365 Copilot

Note

  • Ensure that Microsoft 365 Copilot is available for your organization. You have two ways to get a developer environment for Microsoft 365 Copilot:
  • Bot-based search message extension plugin is available in public developer preview.
  • Only bot-based message extensions with search commands can be extended as plugins for Microsoft 365 Copilot.

Microsoft 365 Copilot, powered by an advanced processing and orchestration engine, integrates Microsoft 365 apps, Microsoft Graph, and Large Language Models (LLMs) to transform your words into a potent productivity tool. Although Microsoft 365 Copilot can utilize apps and data within the Microsoft 365 ecosystem, many users rely on various external tools and services for work management and collaboration. By extending your message extension as a plugin in Microsoft 365 Copilot, you can enable users to interact with third-party tools and services, therefore empowering them to achieve more with Microsoft 365 Copilot. You can achieve this extension by developing a plugin or connecting to an external data source.

Graphic shows the user interaction flow between the user, Microsoft Teams, and Microsoft 365 Copilot.

See the video to learn more about extending Microsoft 365 Copilot using Microsoft Teams message extensions:

What is a plugin?

A plugin allows Microsoft 365 Copilot to interact directly with third-party data, apps, and services, enhance its capabilities, and broaden its range of capabilities. Plugins allow Microsoft 365 Copilot to:

  • Fetch real-time information, such as the latest news coverage on a product launch.
  • Retrieve knowledge-based information, such as a team’s design files in Figma.

Descriptions enhance the usability and effectiveness of a message extension plugin. The following description offer a clear and concise summary of the app’s features:

  • App description: App description helps improve your app discoverability in the Teams Store.
  • Command description: Command description maps user intent and utterance to search command inside a plugin and must be built based on the analysis of the user intent and keywords.
  • Parameter description: Parameter description explains the requirements of the system in a natural language with output format.
  • Semantic description: Semantic description helps Microsoft 365 Copilot generate content by providing a conceptual understanding of the plugin's capabilities and scenarios where it can help achieve user goals and match user’s intent with the plugin's capabilities.

For more information, see guidelines to create and upgrade Copilot agents.

All bot-based search message extensions are eligible for plugin support, subject to validation to ensure the plugin meets quality, security, privacy, and usefulness expectations. You can create a bot-based search message extension using Teams Toolkit for Visual Studio Code, Visual Studio, Teams Toolkit command line interface (CLI), or Developer Portal for Teams and extend the message extension to function as a plugin in Microsoft 365 Copilot.

Prerequisites

Before you get started, ensure that you're familiar with the following standards and guidelines for building message extension plugins for Microsoft 365 Copilot:

Create bot-based message extension

Important

Plugins for Microsoft 365 Copilot are in preview and only work in Microsoft 365 Copilot in Teams.

Let's create a bot-based search message extension that can search npm registries in Teams and Microsoft 365 Copilot and share results through the compose message area of the Microsoft Teams client.

Before you get started, ensure that you install the following tools to build and deploy your message extension:

  • Install the latest Teams Toolkit prerelease version.
  • Ensure that the Develop Copilot Plugin feature flag is enabled. To enable the feature flag, follow these steps:
    1. Open Visual Studio Code.
    2. Go to Manage > Settings.
    3. Enter Teams Toolkit in the Search settings search box.
    4. Under Extensions, select the Fx-extension: Develop Copilot Plugin checkbox.

To create a bot-based search message extension plugin using Visual Studio Code, follow these steps:

  1. Open Visual Studio Code.

  2. From the left pane, select Teams Toolkit.

  3. Select Create a New App.

  4. Select Message Extension.

  5. Select Custom Search Results.

  6. Select Start with a Bot.

    Screenshot shows the Start with a Bot option to create a bot-based message extension in Visual Studio Code.

  7. Select a programming language.

  8. Select Default folder.

  9. Enter the name of your app and select Enter. Teams Toolkit scaffolds your app and creates a message extension.

To run your message extension in Teams, follow these steps:

  1. From the left pane, select Teams Toolkit.

  2. Under ACCOUNTS, perform the following steps:

    1. Select Sign in to Microsoft 365 and enter your Microsoft 365 credentials.

    2. Select Sign in to Azure and enter your Azure credentials.

      Screenshot shows the Sign in to Microsoft 365 and Azure option under ACCOUNTS in Teams Toolkit for Visual Studio Code.

  3. From the left pane, select Run and Debug (Ctrl+Shift+D).

  4. Select Debug in Teams (Edge) or Debug in Teams (Chrome). Teams Toolkit launches your app in Teams using a web browser.

  5. Select Add. The app is installed on Teams.

  6. Go to a chat and select Actions and apps.

  7. From the message extension fly-out menu, enter the name of your message extension in the search box.

  8. Select your message extension and enter your search query.

  9. Select a product from the list. Teams unfurls the product as an Adaptive Card in the message compose area.

  10. Select Send.

Trigger message extension in Microsoft 365 Copilot

To trigger the message extension as plugin in Microsoft 365 Copilot in Teams, follow these steps:

  1. Select Apps.

  2. Search for Copilot and open Microsoft 365 Copilot.

  3. Select Plugins.

  4. From the list of plugins, turn on the toggle for your message extension.

    Screenshot shows the Plugin option, list of plugins, and the toggle enabled for bot-based-ME-test-local plugin.

  5. From the message compose area, send a message to Microsoft 365 Copilot to search for npm package information in Teams and Microsoft 365 Copilot. For example, find the npm package info on teamsfx-react in npm-searchlocal.

    Screenshot shows the plugin prompt and the response from Microsoft 365 Copilot.

Note

This prompt might not always make Microsoft 365 Copilot include a response from your message extension. If it happens, try some other prompts or leave feedback to us by downvoting the Microsoft 365 Copilot response and leave a message.

For more on testing your plugin in Microsoft 365 Copilot, see debugging plugin selection.

Enable message extension as a plugin for Copilot for meetings

Ensure that you've created a bot-based message extension and extended it as a plugin for Microsoft 365 Copilot. Before you get started, follow the guidelines listed in ensure your Copilot plugins work in Teams meetings to extend your plugin for Copilot for meetings.

To enable message extension as a plugin for Copilot for meetings, follow these steps:

  1. Go to a Teams meeting.

  2. Select Join.

  3. In the meeting window, select Copilot.

  4. Select Start transcription.

    Screenshot shows the Copilot option and start transcription button in a Teams meeting.

  5. Select the Spoken language and select Confirm. The Copilot for Teams pane appears.

    Screenshot shows the dropdown to select a spoken language and a confirm button in Teams meeting.

  6. In the Copilot for Teams pane, at the bottom-right corner, select the Copilot Plugin Button.

    Screenshot shows the plugin icon in the Copilot for Teams pane in a Teams meeting.

  7. Search for your plugin and turn on the toggle for your plugin.

  8. From the compose area, select More prompts to send a static prompt or you can type your own prompt and select Send.

    Screenshot shows the list of static prompts available in the Copilot for Teams pane in a Teams meeting.

Copilot for meetings helps your meetings to be better and more productive. You can make meetings more interactive, which helps users by giving them a smoother and more interesting experience.

Step-by-step guide

Follow the step-by-step guide to build a bot-based search message extension plugin for Microsoft 365 Copilot.

See also