Build in-meeting notification for Teams meeting
The in-meeting notification is used to engage participants and collect information or feedback during the meeting. Use an in-meeting notification payload to trigger an in-meeting notification. As part of the notification payload request, include the URL where the content to be shown is hosted.
An external resource URL is used to display in-meeting notification. You can use the submitTask
method to submit data in a meeting chat.
You can also add the Teams display picture and people card of the user to in-meeting notification based on onBehalfOf
token with user MRI and display name passed in payload. Following is an example payload:
{
"type": "message",
"text": "John Phillips assigned you a weekly todo",
"summary": "Don't forget to meet with Marketing next week",
"channelData": {
onBehalfOf: [
{
itemId: 0,
mentionType: 'person',
mri: context.activity.from.id,
displayname: context.activity.from.name
}
],
"notification": {
"alertInMeeting": true,
"externalResourceUrl": "https://teams.microsoft.com/l/bubble/APP_ID?url=<url>&height=<height>&width=<width>&title=<title>&completionBotId=BOT_APP_ID"
}
},
"replyToId": "1493070356924"
}
Feature compatibility by user types
The following table provides the user types and lists the features that each user can access in meetings:
User type | Scheduled meeting or Instant calendar meeting | One-on-one call | Group call | Scheduled channel meeting |
---|---|---|---|---|
In-tenant | Available | Available | Available | Available |
Guest | Available | Available | Available | Available |
Federated or External | Available | Not available | Not available | Available |
Anonymous | Available | Not available | Not available | Not available |
Targeted in-meeting notification
Targeted in-meeting notification allows apps to send notifications to specific participants on a meeting stage. The notifications are private and are sent only to specific or targeted participants. Targeted in-meeting notification helps to enhance meeting experience and develop user engagement activities in Teams meetings.
Note
Targeted in-meeting notification is supported for scheduled meetings, instant meeting (Meet now), one-on-one calls, and group calls.
In the following image, a meeting notification requesting payment is sent to one of the participants in the meeting. The meeting notification is only visible to the targeted participant:
Enable app manifest settings for targeted in-meeting notification
To send targeted in-meeting notifications, you must configure the authorization
property and the name
and type
properties under the resourceSpecific
field in the app manifest as follows:
"webApplicationInfo": {
"id": "<<MICROSOFT-APP-ID>>",
"resource": "https://RscBasedStoreApp" },
"authorization": {
"permissions": {
"resourceSpecific": [
{
"name": "OnlineMeetingNotification.Send.Chat",
"type": "Application" }
]
}
}
Enable targeted in-meeting notification
Note
You can only send a targeted in-meeting notification to 50 meeting participants in a single API call. If you want to send a targeted in-meeting notification to more than 50 participants, you must call the targetedMeetingNotification
API again.
Targeted in-meeting notification can be triggered by user action.
To enable the targeted in-meeting notification:
Retrieve the user IDs of the participants through Get participant API and Get members API.
Note
Targeted in-meeting notification doesn't support user IDs in the Microsoft Entra user ID format.
The following is an example of a user ID:
id=29:1I12M_iy2wTa97T6LbjTh4rJCWrtw2PZ3lxpD3yFv8j2YPnweY2lpCPPAn3RIOPP7rghfHauUz48I1t7ANhj4CA
Include the user IDs in the request parameter.
The following is an example of a request:
POST /v1/meetings/{meetingId}/notification
The following is an example of a payload:
{ "type": "targetedMeetingNotification", "value": { "recipients": [ "29:1I12M_iy2wTa97T6LbjTh4rJCWrtw2PZ3lxpD3yFv8j2YPnweY2lpCPPAn3RI0PP7rghfHauUz48I1t7ANhj4CA" ], "surfaces": [ { "surface": "meetingStage", "contentType": "task", "content": { "value": { "height": "300", "width": "400", "title": "Targeted meeting Notification", "url": "https://somevalidurl.com" } } } ] }, "channelData": { // optional if a developer doesn't want to support user attributes. "onBehalfOf": [ { "itemid": 0, "mentionType": "person", "mri": "29:1mDOCfGM9825lMHlwP8NjIVMJeQAbN-ojYBT5VzQfPpnst1IFQeYB1QXC8Zupn2RhgfLIW27HmynQk-4bdx_YhA", "displayName": "yunny chung" } ] } }
Targeted in-meeting notification is enabled.
For more information on targetedMeetingNotification
, see Targeted meeting notification and app icon badging API.
After you've built in-meeting notification for your app, you can use the targetedMeetingNotification
API to enable app icon badging for your meeting app. This helps meeting participants to get a notification whenever there's new activity in the app. For more information, see enable app icon badging for your Teams app.
Code sample
Sample name | Description | .NET | Node.js | Manifest |
---|---|---|---|---|
In-meeting notification | Demonstrates how to implement in-meeting notification using bot. | View | View | View |
Step-by-step guide
Follow the step-by-step guide to generate in-meeting notification in your Teams meeting.