Updates from: 02/13/2024 07:16:04
Service Microsoft Docs article Related commit history on GitHub Change details
platform Resource Specific Consent https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/graph-api/rsc/resource-specific-consent.md
A limited set of RSC permissions have been reviewed by Microsoft privacy and sec
| Permission name | Action | Type: Delegated | Type: Application | | -- | -- | :--: | :--: | |`TeamsActivity.Send.Group`|Send activity feed notifications to users in this team. | NA | Supported |
+|`TeamsActivity.Send.User`|Send activity feed notifications to the user. | NA | Supported |
### RSC-based data access APIs
platform Api Based Overview https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/messaging-extensions/api-based-overview.md
Title: Build message extensions using API
-description: Learn how to build a message extension using an OpenAPI description document (API).
+description: Learn how to build a message extension from an OpenAPI description document (API) using Teams Toolkit.
ms.localizationpriority: medium
Message extensions built using API (API-based) use a web service to manage user
You can create an API-based message extension using an [OpenAPI Description (OAD)](https://learn.openapis.org/specification/) document. After you've created an OpenAPI Description document, upload the OpenAPI Description document to Teams Toolkit to generate and integrate the client code in your app's project. Create or generate a response rendering template to manage the responses from the API.
->[!IMPORTANT]
-> You can build an API-based message extension now and starting early next year, the extensions will function as plugins within Copilot and enhance Copilot experience for your extensions.
- See the video to learn more about building an API-based message extension using Teams Toolkit: </br> </br>
platform Build Api Based Message Extension https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/messaging-extensions/build-api-based-message-extension.md
API-based message extensions are a potent tool that enhances your Teams app's fu
</details>
-You can create an API-based message extension using Visual Studio Code, Teams Toolkit CLI, or Visual Studio.
+You can create an API-based message extension using Developer Portal for Teams, Visual Studio Code, Teams Toolkit CLI, or Visual Studio.
-<!--# [Developer Portal for Teams](#tab/developer-portal-for-teams)
+# [Developer Portal for Teams](#tab/developer-portal-for-teams)
To create an API-based message extension using Developer Portal for Teams, follow these steps: 1. Go to **[Teams Developer Portal](https://dev.teams.microsoft.com/home)**. 1. Go to **Apps**. 1. Select **+ New apps**.
-1. Enter a name of the app and select **Add**.
-1. In the left pane, under **Configure**, select **App features**.
+1. Enter a name of the app and select the **Manifest version** as **Latest prerelease (devPreview)**.
+
+1. Select **Add**.
+
+ :::image type="content" source="../assets/images/Copilot/api-based-me-tdp-manifest-version.png" alt-text="Screenshot shows the app name and the manifest version selected as Latest prerelease (devPreview) in Developer Portal.":::
+
+1. In the left pane, under **Configure**, update the following **Basic information**:
+
+ 1. Full name
+ 1. Short description
+ 1. Long description
+ 1. Developer or company name
+ 1. Website (must be a valid HTTPS URL)
+ 1. Privacy policy
+ 1. Terms of use
+
+1. Select **Save**.
+
+1. Select **App features**.
1. Select **Messaging extension**. :::image type="content" source="../assets/images/Copilot/api-based-me-tdp-app-feature.png" alt-text="Screenshot shows the message extension option in Teams Developer Portal.":::
-1. Under **Message extension type**, select **API-based**.
+1. Under **Message extension type**, select **API**.
-1. If you get a disclaimer which reads **Bot message extension is already in use by users. Would you like to change message extension type to API?**, select **Yes, change**.
+ 1. If you get a disclaimer, which reads **Bot message extension is already in use by users. Would you like to change message extension type to API?**. Select **Yes, change**.
-1. Under **Open API spec**, select **Upload now**.
+1. Under **OpenAPI spec**, select **Upload now**.
:::image type="content" source="../assets/images/Copilot/api-based-me-tdp-upload.png" alt-text="Screenshot shows the Upload now option in Teams Developer Portal.":::
-1. Select the Open OpenAPI Description document in JSON or YAML and select **Open**.
+1. Select the OpenAPI Description document in the JSON or YAML format and select **Open**.
1. Select **Save**. A pop-up appears with the message **API spec saved successfully**. 1. Select **Got it**.
- :::image type="content" source="../assets/images/Copilot/api-based-me-tdp-api-saved.png" alt-text="Screenshot shows an example of the the API spec saved successfully message and Got it button.":::
+ :::image type="content" source="../assets/images/Copilot/api-based-me-tdp-api-saved.png" alt-text="Screenshot shows an example of the API spec saved successfully message and Got it button.":::
**Add commands** > [!NOTE]
-> Message extensions built from an API only support single parameter.
+> Message extensions built from an API only support a single parameter.
You can add commands and parameters to your message extension, to add commands:
You can add commands and parameters to your message extension, to add commands:
:::image type="content" source="../assets/images/Copilot/api-based-me-tdp-add-commands.png" alt-text="Screenshot shows the add option to add commands in Teams Developer Portal.":::
- A **Add a command** pop-up appears with a list of all the available APIs from the Open API Description document.
+ An **Add command** pop-up appears with a list of all the available APIs from the OpenAPI Description document.
1. Select an API from the list and select **Next**. :::image type="content" source="../assets/images/Copilot/api-based-me-tdp-commands-api-list.png" alt-text="Screenshot shows the list of APIs from the OpenAPI Description Document in the Add a command pop-up window.":::
- A **Add a command** page appears.
+ A **Command details** appears.
-1. In the **Add command** page, go to **Adaptive card template** and select **Upload now**.
+1. Under **Command details**, go to **Adaptive card template** and select **Upload now**.
- :::image type="content" source="../assets/images/Copilot/api-based-me-tdp-adaptive-card-template.png" alt-text="Screenshot shows the Upload now option to add the adaptive Card template in for the command.":::
+ :::image type="content" source="../assets/images/Copilot/api-based-me-tdp-adaptive-card-template.png" alt-text="Screenshot shows the Upload now option to add the adaptive Card template in for the command.":::
> [!NOTE]
- > If you have more than one API, ensure that you upload the **Adaptive card template** for all the APIs.
+ > If you have more than one API, ensure that you upload the **Adaptive card template** for each API.
1. Select the Adaptive Card template file in JSON format and select **Open**.
You can add commands and parameters to your message extension, to add commands:
1. Under **Details**, update the **Command description**.
-1. If you want to launch a command using a trigger in Microsoft 365 chat, Turn on the **Automatically run the command when a user opens the extension** toggle.
+ 1. If you want to launch a command using a trigger in Microsoft 365 chat, turn on the **Automatically run the command when a user opens the extension** toggle.
1. Select **Add**. The command is added successfully. 1. Select **Save**.
- :::image type="content" source="../assets/images/Copilot/api-based-me-tdp-plugin-copilot.png" alt-text="Screenshot shows the plugin for copilot app created in the app features page in Teams Developer Portal.":::
+An API-based message extension is created.
++
+To test your API-based message extension created in the Developer Portal for Teams, you can use the following methods:
+
+* **Preview in Teams**: In Developer Portal, open your message extension and select **Preview in Teams** in the upper-right corner. You'll be redirected to Teams, where you can add the app to Teams to preview the app.
-An API message extension is created. -->
+* **Download app package**: On the message extension page, select **App package** from the left pane and then, in the upper-left corner of the window, select **Download app package**. The app package is downloaded to your local machine in a .zip file. You can upload the app package to teams and test the message extension.
# [Visual Studio Code](#tab/visual-studio-code)
To create an API-based message extension using Teams Toolkit for Visual Studio,
1. Select **Next**.
- :::image type="content" source="../assets/images/Copilot/api-based-me-vs-create-project.png" alt-text="Screenshot shows the Search results from API, New API, OpenAPI Description Document, and Create options in Visual Studio to create a new Project.":::
+ :::image type="content" source="../assets/images/Copilot/api-based-me-vs-create-project.png" alt-text="Screenshot shows the Search results from API, New API, OpenAPI Description Document, and Create options in Visual Studio to create a new Project.":::
1. Based on the options selected in **step 7**, select the following:
To create an API-based message extension using Teams Toolkit for Visual Studio,
||| |`repair.cs` | The main file of a function in Azure Functions. Defines an Azure Function that retrieves and filters repair records based on a query parameter from an HTTP GET request, and returns the results as a JSON response.| |`RepairData.cs`|The data source for the repair API. Contains a method that returns a hardcoded list of car repair tasks. |
- |`Models/RepairModel.cs`|Defines a data model that represents a repair task with properties such as Id, Title, Description, AssignedTo, Date, and Image.|
+ |`Models/RepairModel.cs`|Defines a data model that represents a repair task with properties such as ID, Title, Description, AssignedTo, Date, and Image.|
|`appPackage/apiSpecificationFiles/repair.yml` | A file that describes the structure and behavior of the repair API.| |`appPackage/responseTemplates/repair.json` | A generated Adaptive Card that used to render API response.|
platform Build Bot Based Plugin https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/messaging-extensions/build-bot-based-plugin.md
A plugin allows Copilot for Microsoft 365 to interact directly with third-party
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, or CLI and extend the message extension to function as a plugin in Copilot for Microsoft 365.
+You can create a bot-based search message extension using Teams Toolkit for Visual Studio Code, Visual Studio, Teams Toolkit CLI, or Developer Portal for Teams and extend the message extension to function as a plugin in Copilot for Microsoft 365.
## Prerequisites
To trigger the message extension through M365 Chat, follow these steps:
> [!NOTE] > This prompt might not always make M365 Chat include a response from your message extension. If it happens, try some other prompts or leave feedback to us by downvoting the M365 Chat response and leave a message tagged with [MessageExtension].
-<!--# [Developer Portal for Teams](#tab/developer-portal-for-teams)
+# [Developer Portal for Teams](#tab/developer-portal-for-teams)
1. Go to **Teams Developer Portal**. 1. Go to **Apps**.
-1. Select **Create a new app**.
+1. Select **+ New apps**.
1. Under **Configure**, select **App features**. 1. Select **Messaging extension**.
To trigger the message extension through M365 Chat, follow these steps:
1. Under **Message extension type**, select **Bot**.
+ 1. If you get a disclaimer, which reads **API Message extension is already in use by users. Would you like to change message extension type to bot?**. Select **Yes, change**.
+
+ :::image type="content" source="../assets/images/Copilot/bot-based-me-tdp-type.png" alt-text="Screenshot shows API Message extension is already in use disclaimer when a user switches from API to bot message extension type.":::
1. If you have an existing bot, select **Existing bot** or if you have a bot ID, select **Enter Bot ID**.
- 1. If don't have a Bot ID, you can select **Create a bot**, to create a new bot and enter the bot ID of the new bot that you've created.
+ 1. If you don't have a Bot ID, you can select **Create a new bot**, to create a new bot and enter the bot ID of the new bot that you've created.
+
+ :::image type="content" source="../assets/images/Copilot/bot-based-tdp-select-bot.png" alt-text="Screenshot shows the Bot, Existing bot, and Enter Bot ID options for messaging extension app feature in Developer Portal for Teams.":::
1. Select **Save**.
To trigger the message extension through M365 Chat, follow these steps:
Add a command page appears.
-1. In the **Add a command** page, select the **Search** as the type of command and update the following:
+1. In the **Add a command** page, select the **Search** as the type of command and update the following fields:
* Command ID * Command title * Command description
To trigger the message extension through M365 Chat, follow these steps:
1. Select **Save**.
-A bot-based message extension is created.
+A bot-based search message extension is created.
++
+To test your bot-based message extension created in the Developer Portal for Teams, you can use the following methods:
+
+* **Preview in Teams**: In Developer Portal, open your message extension and select **Preview in Teams** in the upper-right corner. You'll be redirected to Teams, where you can add the app to Teams to preview the app.
+* **Download app package**: On the message extension page, select **App package** from the left pane and then, in the upper-left corner of the window, select **Download app package**. The app package is downloaded to your local machine in a .zip file. You can upload the app package to teams and test the message extension.
platform Define Action Command https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/messaging-extensions/how-to/action-commands/define-action-command.md
Before creating the action command, you must decide the following factors: 1. [Where can the action command be triggered from?](#select-action-command-invoke-locations)
-1. [How will the dialog (referred as task module in TeamsJS v1.x) be created?](#select-how-to-create-your-dialog)
-1. [Will the final message or card be sent to the channel from a bot, or will the message or card be inserted into the compose message area for the user to submit?](#select-how-the-final-message-is-sent)
+1. [How is the dialog (referred as task module in TeamsJS v1.x) created?](#select-how-to-create-your-dialog)
+1. [Is the final message or card sent to the channel from a bot, or is the message or card inserted into the compose message area for the user to submit?](#select-how-the-final-message-is-sent)
See the following video to learn how to define message extension action commands: <br>
See the following video to learn how to define message extension action commands
## Select action command invoke locations
-First, you must decide the location from where your action command must be invoked. By specifying the `context` in your app manifest (previously called Teams app manifest), your command can be invoked from one or more of the following locations:
+First, you must decide the location from where your action command must be invoked. When you specify the `context` property in your app manifest (previously called Teams app manifest), your command can be invoked from one or more of the following locations:
* Compose message area: The buttons at the bottom of the compose message area.
To create an action-based message extension using Developer Portal for Teams, fo
:::image type="content" source="../../../assets/images/Copilot/api-based-me-tdp-app-feature.png" alt-text="Screenshot shows the message extension option in Teams Developer Portal.":::
+1. Under **Message extension type**, select **Bot**.
+
+ 1. If you get a disclaimer, which reads **API Message extension is already in use by users. Would you like to change message extension type to bot?**. Select **Yes, change**.
+
+ :::image type="content" source="../../../assets/images/Copilot/bot-based-me-tdp-type.png" alt-text="Screenshot shows API Message extension is already in use disclaimer when a user switches from API to bot message extension type.":::
+ 1. If you don't have an existing bot, select **Existing bot** or if you have a bot ID, select **Enter Bot ID**.
- 1. If you don't have a bot ID, select **Create a bot**, to create a new bot and enter the bot ID of the new bot that you've created.
+ 1. If you don't have a bot ID, select **Create a bot**, to create a new bot and enter the bot ID of the new bot that you created.
1. Select the required scopes.
To create an action-based message extension using Developer Portal for Teams, fo
1. In the Command details page, select **Action** and then select parameter type.
-1. Select **Action** as the type of command and update the following:
+1. Select **Action** as the type of command and update the following fields:
* Command ID * Command title * Command description
To create an action-based message extension using Developer Portal for Teams, fo
**To add additional parameters**
-1. Select ellipse under command section and then select **Edit parameter**.
+1. Under command, select the ellipse (**...**) icon and then select **Edit parameter**.
:::image type="content" source="../../../assets/images/tdp/edit-parameters.PNG" alt-text="Screenshots shows how to add additional parameters for your message extension.":::
-1. Select **Add a Parameters** and enter all the parameters.
+1. Select **Add a Parameter** and update the parameter details.
:::image type="content" source="../../../assets/images/tdp/add-parameter.PNG" alt-text="Screenshot shows how to add additional parameters for your message extension."lightbox="../../../assets/images/tdp/add-a-parameters.PNG":::
-A search message extension using bot framework is created.
+1. Select **Save**
+
+A bot-based action message extension is created.
platform Define Search Command https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/messaging-extensions/how-to/search-commands/define-search-command.md
The search command is invoked from any one or both of the following locations:
* Compose message area: The buttons at the bottom of the compose message area. * Command box: By using / in the command box. For example, **/your-app-name**. If you're using the classic Teams, search command is invoked by @mentioning in the command box. For example, **@your-app-name**.
-When a search command is invoked from the compose message area, the user sends the results to the conversation. When it's invoked from the command box, the user interacts with the resulting card, or copies it for use elsewhere.
+When a search command is invoked from the compose message area, the user sends the results to the conversation. When a search command invoked from the command box, the user interacts with the resulting card, or copies it for use elsewhere.
The following image displays the invoke locations of the search command:
Before you get started, ensure that you meet the following requirements:
* [Node.js](https://nodejs.org/en). The supported versions are 16, 18. * [Microsoft 365 account for development](../../../toolkit/tools-prerequisites.md#microsoft-365-developer-program)
-* [Set up your dev environment for extending Teams apps across Microsoft 365.](../../../m365-apps/prerequisites.md) After you've enrolled your developer tenant in Office 365 Targeted Release, it may take a couple of days for the enrollment to take effect.
+* [Set up your dev environment for extending Teams apps across Microsoft 365.](../../../m365-apps/prerequisites.md) After you've enrolled your developer tenant in Office 365 Targeted Release, it might take a couple of days for the enrollment to take effect.
* [Teams Toolkit Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) version 5.2.0 and higher or Teams Toolkit CLI. # [Teams Toolkit](#tab/Teams-toolkit)
To run the message extension in Teams, follow these steps:
:::image type="content" source="../../../assets/images/Copilot/api-based-me-tdp-app-feature.png" alt-text="Screenshot shows the message extension option in Teams Developer Portal.":::
+1. Under **Message extension type**, select **Bot**.
+
+ 1. If you get a disclaimer, which reads **API Message extension is already in use by users. Would you like to change message extension type to bot?**. Select **Yes, change**.
+
+ :::image type="content" source="../../../assets/images/Copilot/bot-based-me-tdp-type.png" alt-text="Screenshot shows API Message extension is already in use disclaimer when a user switches from API to bot message extension type.":::
+ 1. If you have an existing bot, select **Existing bot** or if you have a bot ID, select **Enter Bot ID**.
- 1. If you don't have a bot ID, select **Create a bot**, to create a new bot and enter the bot ID of the new bot that you've created.
+ 1. If you don't have an existing bot ID, select **Create a bot**, to create a new bot and enter the bot ID of the new bot that you created.
1. Select **Save**.
To run the message extension in Teams, follow these steps:
A command details page appears.
-1. In the Command details page, select **Search** as the type of command and update the following:
+1. In the Command details page, select **Search** as the type of command and update the following fields:
* Command ID * Command title * Command description
To run the message extension in Teams, follow these steps:
* Select the type of input 1. Select **Save**. A search message extension using bot framework created.
-1. At the upper-right, select **Preview in Teams**. The app opens in Teams desktop or web client.
+1. At the upper-right corner, select **Preview in Teams**. The app opens in Teams desktop or web client.
async handleTeamsMessagingExtensionQuery(context, query) {
| Sample name | Description | .NET | Node.js | Manifest| |:|:--|:|:--|:--|
-|Teams message extension search | This sample shows how to build a search-based message extension. It searches nudget packages and displays the results in search-based messaging extension. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-search/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-search/nodejs)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-search/csharp/demo-manifest/msgext-search.zip)
+|Teams message extension search | This sample shows how to build a search-based message extension. It searches NuGet packages and displays the results in search-based messaging extension. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-search/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-search/nodejs)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-search/csharp/demo-manifest/msgext-search.zip)
## Step-by-step guide
platform Whats New https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/whats-new.md
Developer preview is a public program that provides early access to unreleased T
**2024 February**
-***February 06, 2024***: [Introduced systemDefault reserved activity type for send activity feed notifications](tabs/send-activity-feed-notification.md#requirements-to-use-the-activity-feed-notification-apis).
+* ***February 12, 2024***: [Build API-based message extension using Developer Protal for Teams.](messaging-extensions/build-api-based-message-extension.md)
+
+* ***February 06, 2024***: [Introduced systemDefault reserved activity type for send activity feed notifications](tabs/send-activity-feed-notification.md#requirements-to-use-the-activity-feed-notification-apis).
:::column-end::: :::row-end:::