Updates from: 01/20/2023 04:59:07
Service Microsoft Docs article Related commit history on GitHub Change details
platform Meeting Apps Apis https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/meeting-apps-apis.md
The `getIncomingClientAudioState` API allows an app to get the incoming audio st
> [!NOTE] >
-> * The `getIncomingClientAudioState` API for mobile is currently available in [Public Developer Preview](../resources/dev-preview/developer-preview-intro.md).
+> * The `getIncomingClientAudioState` API for mobile is available only in [public developer preview](../resources/dev-preview/developer-preview-intro.md).
> * Resource specific consent is available for manifest version 1.12 and later versions, hence this API doesn't work for manifest version 1.11 and earlier versions. ### Manifest
The `toggleIncomingClientAudio` API allows an app to toggle the incoming audio s
> [!NOTE] >
-> * The `toggleIncomingClientAudio` API for mobile is currently available in [Public Developer Preview](../resources/dev-preview/developer-preview-intro.md).
+> * The `toggleIncomingClientAudio` API for mobile is available only in [public developer preview](../resources/dev-preview/developer-preview-intro.md).
> * Resource specific consent is available for manifest version 1.12 and later versions, hence this API doesn't work for manifest version 1.11 and earlier versions. ### Manifest
platform Teams Apps In Meetings https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/teams-apps-in-meetings.md
Teams supports access to apps during meeting for the following meeting types:
Learn more about [Teams meetings, expiration and policies](/microsoftteams/meeting-expiration) and [meetings, webinars, and live events](/microsoftteams/quick-start-meetings-live-events). > [!NOTE] >
-> * Apps for scheduled public channel meetings are currently available only in [public developer preview](../resources/dev-preview/developer-preview-intro.md).
+> * Apps for scheduled public channel meetings are available only in [public developer preview](../resources/dev-preview/developer-preview-intro.md).
> * Apps aren't supported in the following: > * [Public Switched Telephone Network (PSTN) Teams calls](/microsoftteams/cloud-voice-landing-page#public-switched-telephone-network-connectivity-options) > * [End-to-end encrypted Teams calls](https://support.microsoft.com/office/use-end-to-end-encryption-for-teams-calls-1274b4d2-b5c5-4b24-a376-606fa6728a90)
platform Teams Live Share Overview https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/teams-live-share-overview.md
Sometimes screen sharing just isn't enough, which is why Microsoft built tools l
> [!div class="nextstepaction"] > [Get started](teams-live-share-quick-start.md)
+> [!NOTE]
+>
+> Live Share SDK is available only in [public developer preview](../resources/dev-preview/developer-preview-intro.md).
+ ## Feature overview Live Share has three packages that support limitless collaborative scenarios. These packages expose a set of distributed data structures (DDS), including primitive building blocks and turn-key scenarios.
platform Bot Basics https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/bots/bot-basics.md
# Bot activity handlers
-This document builds on the article on [how bots work](https://aka.ms/how-bots-work) in the core [Bot Framework documentation](https://aka.ms/azure-bot-service-docs). The primary difference between bots developed for Microsoft Teams and the core Bot Framework is in the features provided in Teams.
+This document builds on the article on [how bots work](/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0&preserve-view=true) in the core [Bot Framework documentation](/azure/bot-service/?view=azure-bot-service-4.0&preserve-view=true). The primary difference between bots developed for Microsoft Teams and the core Bot Framework is in the features provided in Teams.
An activity handler is used to organize the conversational logic for your bot. Activities are handled in two ways using Teams activity handlers and bot logic. The Teams activity handler adds support for Teams-specific events and interactions. The bot object contains the conversational reasoning or logic for a turn and exposes a turn handler, which is the method that can accept incoming activities from the bot adapter.
The `TeamsActivityHandler` extends the list of handlers in the core Bot Framewor
| Event | Handler | Description | | :-- | :-- | :-- |
-| channelCreated | `OnTeamsChannelCreatedAsync` | This method can be overridden to handle a Teams channel being created. For more information, see [channel created](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-created) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events). |
-| channelDeleted | `OnTeamsChannelDeletedAsync` | This method can be overridden to handle a Teams channel being deleted. For more information, see [channel deleted](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-deleted) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| channelRenamed | `OnTeamsChannelRenamedAsync` | This method can be overridden to handle a Teams channel being renamed. For more information, see [channel renamed](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-renamed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| teamRenamed | `OnTeamsTeamRenamedAsync` | `return Task.CompletedTask;` This method can be overridden to handle a Teams team being renamed. For more information, see [team renamed](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-renamed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| MembersAdded | `OnTeamsMembersAddedAsync` | This method calls the `OnMembersAddedAsync` method in `ActivityHandler`. The method can be overridden to handle members joining a team. For more information, see [team members added](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-members-added) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| MembersRemoved | `OnTeamsMembersRemovedAsync` | This method calls the `OnMembersRemovedAsync` method in `ActivityHandler`. The method can be overridden to handle members leaving a team. For more information, see [team members removed](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-members-removed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
+| channelCreated | `OnTeamsChannelCreatedAsync` | This method can be overridden to handle a Teams channel being created. For more information, see [channel created](how-to/conversations/subscribe-to-conversation-events.md#channel-created) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| channelDeleted | `OnTeamsChannelDeletedAsync` | This method can be overridden to handle a Teams channel being deleted. For more information, see [channel deleted](how-to/conversations/subscribe-to-conversation-events.md#channel-deleted) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| channelRenamed | `OnTeamsChannelRenamedAsync` | This method can be overridden to handle a Teams channel being renamed. For more information, see [channel renamed](how-to/conversations/subscribe-to-conversation-events.md#channel-renamed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| teamRenamed | `OnTeamsTeamRenamedAsync` | `return Task.CompletedTask;` This method can be overridden to handle a Teams team being renamed. For more information, see [team renamed](how-to/conversations/subscribe-to-conversation-events.md#team-renamed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| MembersAdded | `OnTeamsMembersAddedAsync` | This method calls the `OnMembersAddedAsync` method in `ActivityHandler`. The method can be overridden to handle members joining a team. For more information, see [team members added](how-to/conversations/subscribe-to-conversation-events.md#members-added) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| MembersRemoved | `OnTeamsMembersRemovedAsync` | This method calls the `OnMembersRemovedAsync` method in `ActivityHandler`. The method can be overridden to handle members leaving a team. For more information, see [team members removed](how-to/conversations/subscribe-to-conversation-events.md#members-removed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
#### Teams invoke activities
The list of Teams activity handlers called from the `OnInvokeActivityAsync` Team
| task/fetch | `OnTeamsTaskModuleFetchAsync` | This method can be overridden in a derived class to provide logic when a task module is fetched. | | task/submit | `OnTeamsTaskModuleSubmitAsync` | This method can be overridden in a derived class to provide logic when a task module is submitted. |
-The Invoke activities listed in this section are for conversational bots in Teams. The Bot Framework SDK also supports invoke activities specific to message extensions. For more information, see [what are message extensions](https://aka.ms/azure-bot-what-are-messaging-extensions).
+The Invoke activities listed in this section are for conversational bots in Teams. The Bot Framework SDK also supports invoke activities specific to message extensions. For more information, see [what are message extensions](../messaging-extensions/what-are-messaging-extensions.md).
# [JavaScript](#tab/javascript)
The `TeamsActivityHandler` extends the list of handlers in the core Bot Framewor
| Event | Handler | Description | | :-- | :-- | :-- |
-| channelCreated | `onTeamsChannelCreated` | This method can be overridden to handle a Teams channel being created. For more information, see [channel created](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-created) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events). |
-| channelDeleted | `onTeamsChannelDeleted` | This method can be overridden to handle a Teams channel being deleted. For more information, see [channel deleted](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-deleted) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| channelRenamed | `onTeamsChannelRenamed` | This method can be overridden to handle a Teams channel being renamed. For more information, see [channel renamed](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-renamed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events). |
-| teamRenamed | `onTeamsTeamRenamed` | `return Task.CompletedTask;` This method can be overridden to handle a Teams team being renamed. For more information, see [team renamed](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-renamed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events). |
-| MembersAdded | `onTeamsMembersAdded` | This method calls the `OnMembersAddedAsync` method in `ActivityHandler`. The method can be overridden to handle members joining a team. For more information, see [team members added](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-members-added) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events). |
-| MembersRemoved | `onTeamsMembersRemoved` | This method calls the `OnMembersRemovedAsync` method in `ActivityHandler`. The method can be overridden to handle members leaving a team. For more information, see [team members removed](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-members-removed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events). |
+| channelCreated | `OnTeamsChannelCreatedAsync` | This method can be overridden to handle a Teams channel being created. For more information, see [channel created](how-to/conversations/subscribe-to-conversation-events.md#channel-created) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md). |
+| channelDeleted | `OnTeamsChannelDeletedAsync` | This method can be overridden to handle a Teams channel being deleted. For more information, see [channel deleted](how-to/conversations/subscribe-to-conversation-events.md#channel-deleted) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| channelRenamed | `OnTeamsChannelRenamedAsync` | This method can be overridden to handle a Teams channel being renamed. For more information, see [channel renamed](how-to/conversations/subscribe-to-conversation-events.md#channel-renamed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md). |
+| teamRenamed | `OnTeamsTeamRenamedAsync` | `return Task.CompletedTask;` This method can be overridden to handle a Teams team being renamed. For more information, see [team renamed](how-to/conversations/subscribe-to-conversation-events.md#team-renamed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md). |
+| MembersAdded | `OnTeamsMembersAddedAsync` | This method calls the `OnMembersAddedAsync` method in `ActivityHandler`. The method can be overridden to handle members joining a team. For more information, see [team members added](how-to/conversations/subscribe-to-conversation-events.md#members-added) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md). |
+| MembersRemoved | `OnTeamsMembersRemovedAsync` | This method calls the `OnMembersRemovedAsync` method in `ActivityHandler`. The method can be overridden to handle members leaving a team. For more information, see [team members removed](how-to/conversations/subscribe-to-conversation-events.md#members-removed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md). |
#### Teams invoke activities
The list of Teams activity handlers called from the `onInvokeActivity` Teams act
| task/fetch | `handleTeamsTaskModuleFetch` | This method can be overridden in a derived class to provide logic when a task module is fetched. | | task/submit | `handleTeamsTaskModuleSubmit` | This method can be overridden in a derived class to provide logic when a task module is submitted. |
-The invoke activities listed in this section are for conversational bots in Teams. The Bot Framework SDK also supports invoke activities specific to message extensions. For more information, see [what are message extensions](https://aka.ms/azure-bot-what-are-messaging-extensions).
+The invoke activities listed in this section are for conversational bots in Teams. The Bot Framework SDK also supports invoke activities specific to message extensions. For more information, see [what are message extensions](../messaging-extensions/what-are-messaging-extensions.md).
# [Python](#tab/python)
The `TeamsActivityHandler` extends the list of handlers from the core Bot Framew
| Event | Handler | Description | | :-- | :-- | :-- |
-| channelCreated | `on_teams_channel_created` | This method can be overridden to handle a Teams channel being created. For more information, see [channel created](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-created) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events). |
-| channelDeleted | `on_teams_channel_deleted` | This method can be overridden to handle a Teams channel being deleted. For more information, see [channel deleted](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-deleted) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| channelRenamed | `on_teams_channel_renamed` | This method can be overridden to handle a Teams channel being renamed. For more information, see [channel renamed](https://aka.ms/azure-bot-subscribe-to-conversation-events#channel-renamed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| teamRenamed | `on_teams_team_renamed` | `return Task.CompletedTask;` This method can be overridden to handle a Teams team being renamed. For more information, see [team renamed](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-renamed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| MembersAdded | `on_teams_members_added` | This method calls the `OnMembersAddedAsync` method in `ActivityHandler`. The method can be overridden to handle members joining a team. For more information, see [team members added](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-members-added) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
-| MembersRemoved | `on_teams_members_removed` | This method calls the `OnMembersRemovedAsync` method in `ActivityHandler`. The method can be overridden to handle members leaving a team. For more information, see [team members removed](https://aka.ms/azure-bot-subscribe-to-conversation-events#team-members-removed) in [conversation update events](https://aka.ms/azure-bot-subscribe-to-conversation-events).|
+| channelCreated | `on_teams_channel_created` | This method can be overridden to handle a Teams channel being created. For more information, see [channel created](how-to/conversations/subscribe-to-conversation-events.md#channel-created) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md). |
+| channelDeleted | `on_teams_channel_deleted` | This method can be overridden to handle a Teams channel being deleted. For more information, see [channel deleted](how-to/conversations/subscribe-to-conversation-events.md#channel-deleted) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| channelRenamed | `on_teams_channel_renamed` | This method can be overridden to handle a Teams channel being renamed. For more information, see [channel renamed](how-to/conversations/subscribe-to-conversation-events.md#channel-renamed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| teamRenamed | `on_teams_team_renamed` | `return Task.CompletedTask;` This method can be overridden to handle a Teams team being renamed. For more information, see [team renamed](how-to/conversations/subscribe-to-conversation-events.md#team-renamed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| MembersAdded | `on_teams_members_added` | This method calls the `OnMembersAddedAsync` method in `ActivityHandler`. The method can be overridden to handle members joining a team. For more information, see [team members added](how-to/conversations/subscribe-to-conversation-events.md#members-added) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
+| MembersRemoved | `on_teams_members_removed` | This method calls the `OnMembersRemovedAsync` method in `ActivityHandler`. The method can be overridden to handle members leaving a team. For more information, see [team members removed](how-to/conversations/subscribe-to-conversation-events.md#members-removed) in [conversation update events](how-to/conversations/subscribe-to-conversation-events.md).|
#### Teams invoke activities
The list of Teams activity handlers called from the `on_invoke_activity` Teams a
| task/fetch | `on_teams_task_module_fetch` | This method can be overridden in a derived class to provide logic when a task module is fetched. | | task/submit | `on_teams_task_module_submit` | This method can be overridden in a derived class to provide logic when a task module is submitted. |
-The invoke activities listed in this section are for conversational bots in Teams. The Bot Framework SDK also supports invoke activities specific to message extensions. For more information, see [what are message extensions](https://aka.ms/azure-bot-what-are-messaging-extensions).
+The invoke activities listed in this section are for conversational bots in Teams. The Bot Framework SDK also supports invoke activities specific to message extensions. For more information, see w[hat are message extensions](../messaging-extensions/what-are-messaging-extensions.md).
platform Add Authentication https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/bots/how-to/authentication/add-authentication.md
OAuth 2.0 is an open standard for authentication and authorization used by Micro
See [OAuth 2 Simplified](https://aka.ms/oauth2-simplified) for a basic understanding, and [OAuth 2.0](https://oauth.net/2/) for the complete specification.
-For more information about how the Azure Bot Service handles authentication, see [User authentication within a conversation](https://aka.ms/azure-bot-authentication).
+For more information about how the Azure Bot Service handles authentication, see [User authentication within a conversation](/azure/bot-service/bot-builder-concept-authentication?view=azure-bot-service-4.0&preserve-view=true).
In this article you'll learn:
With the preliminary settings done, let's focus on the creation of the bot to us
### Deploy the bot to Azure
-To deploy the bot, follow the steps in the How to [Deploy your bot to Azure](https://aka.ms/azure-bot-deployment-cli).
+To deploy the bot, follow the steps in the How to [Deploy your bot to Azure](/azure/bot-service/provision-and-publish-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Ccsharp&preserve-view=true).
Alternatively, while in Visual Studio, you can follow these steps:
Alternatively, while in Visual Studio, you can follow these steps:
:::image type="content" source="../../../assets/images/authentication/auth-bot-app-service.png" alt-text="Screenshot shows how to enter required information for auth app service."::: 1. Select **Create**.
-1. If the deployment completes successfully, you should see it reflected in Visual Studio. Moreover, a page is displayed in your default browser saying *Your bot is ready!*. The URL will be similar to this: `https://botteamsauth.azurewebsites.net/`. Save it to a file.
+1. If the deployment completes successfully, you should see it reflected in Visual Studio. A page is displayed in your default browser saying *Your bot is ready!*. The URL will be similar to this: `https://botteamsauth.azurewebsites.net/`. Save it to a file.
1. In your browser, go to the [**Azure portal**][azure-portal]. 1. Check your resource group, the bot should be listed along with the other resources. The following image is an example:
Alternatively, while in Visual Studio, you can follow these steps:
## Test the bot using the Emulator
-If you haven't done it already, install the [Microsoft Bot Framework Emulator](https://aka.ms/bot-framework-emulator-readme). See also [Debug with the Emulator](https://aka.ms/bot-framework-emulator-debug-with-emulator).
+If you haven't done it already, install the [Microsoft Bot Framework Emulator](https://aka.ms/bot-framework-emulator-readme). See also [Debug with the Emulator](/azure/bot-service/bot-service-debug-emulator?view=azure-bot-service-4.0&tabs=csharp&preserve-view=true).
In order for the bot sample login to work you must configure the Emulator.
After you've configured the authentication mechanism, you can perform the actual
1. Start the Emulator. 1. Select the **Open bot** button. 1. In the **Bot URL**, enter the bot's local URL. Usually, `http://localhost:3978/api/messages`.
-1. In the **Microsoft App ID** enter the bot's app ID from `appsettings.json`.
-1. In the **Microsoft App password** enter the bot's app password from the `appsettings.json`.
+1. In the **Microsoft App ID**, enter the bot's app ID from `appsettings.json`.
+1. In the **Microsoft App password**, enter the bot's app password from the `appsettings.json`.
1. Select **Connect**. 1. After the bot is up and running, enter any text to display the sign-in card. 1. Select the **Sign in** button.
This section provides Bot authentication v3 SDK sample.
## See also -- [Add authentication through Azure Bot Service](https://aka.ms/azure-bot-add-authentication)
+- [Add authentication through Azure Bot Service](/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=userassigned%2Caadv2%2Ccsharp&preserve-view=true)
- [Get access on behalf of a user](/graph/auth-v2-user) <!-- Footnote-style links -->
platform Bot Sso Code https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/bots/how-to/authentication/bot-sso-code.md
To update your app's code:
``` # [JavaScript](#tab/js1)
-
+ Add the following code snippet to `index.js` (or the equivalent class in your app's code):
-
+ ```JavaScript const {TeamsSSOTokenExchangeMiddleware} = require('botbuilder'); const tokenExchangeMiddleware = new TeamsSSOTokenExchangeMiddleware(memoryStorage, env.connectionName); adapter.use(tokenExchangeMiddleware); ```
-
+ >[!NOTE]
To update your app's code:
1. Use the following code snippet for requesting a token. # [csharp](#tab/cs2)
-
+ After you add the `AdapterWithErrorHandler.cs`, your code should be as shown below:
-
+ ```csharp public class AdapterWithErrorHandler : CloudAdapter {
To update your app's code:
{ // Log any leaked exception from the application. // NOTE: In production environment, you should consider logging this to
- // Azure Application Insights. Visit https://aka.ms/bottelemetry to see how
+ // Azure Application Insights. Visit https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-telemetry?view=azure-bot-service-4.0&tabs=csharp to see how
// to add telemetry capture to your bot. logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}");
To update your app's code:
} } ```
-
+ # [JavaScript](#tab/js2)
-
+ After you add the code snippet for `TeamsSSOTokenExchangeMiddleware`, your code should be as shown below:
-
+ ```JavaScript // index.js is used to setup and configure your bot.
To update your app's code:
const restify = require('restify'); // Import required bot services.
- // See https://aka.ms/bot-services to learn more about the different parts of a bot.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about the different parts of a bot.
const { CloudAdapter, ConversationState,
To update your app's code:
console.log(`\n${ conname } is the con name`); // Create adapter.
- // See https://aka.ms/about-bot-adapter to learn more about how bots work.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about how bots work.
const adapter = new CloudAdapter(botFrameworkAuthentication); const memoryStorage = new MemoryStorage(); const tokenExchangeMiddleware = new TeamsSSOTokenExchangeMiddleware(memoryStorage, env.connectionName);
To update your app's code:
adapter.onTurnError = async (context, error) => { // This check writes out errors to console log .vs. app insights. // NOTE: In production environment, you should consider logging this to Azure
- // application insights. See https://aka.ms/bottelemetry for telemetry
+ // application insights. See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-telemetry?view=azure-bot-service-4.0&tabs=csharp for telemetry
// configuration instructions. console.error(`\n [onTurnError] unhandled error: ${ error }`);
To update your app's code:
await adapter.process(req, res, (context) => bot.run(context)); }); ```
-
+ ### Consent dialog for getting access token
async loginStep(stepContext) {
return await stepContext.endDialog(); } ```+ > [!NOTE]
platform Channel And Group Conversations https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/bots/how-to/conversations/channel-and-group-conversations.md
To install the Microsoft Teams bot in a team or group chat, add the `teams` or `
Bots in a group or channel only receive messages when they're mentioned @botname. They don't receive any other messages sent to the conversation. The bot must be @mentioned directly. Your bot doesn't receive a message when the team or channel is mentioned, or when someone replies to a message from your bot without @mentioning it. > [!NOTE]
-> This feature is currently available in [public developer preview](../../../resources/dev-preview/developer-preview-intro.md) only.
+>
+> * RSC for all *chat* messages is available only in [public developer preview](../../../resources/dev-preview/developer-preview-intro.md).
>
-> Using resource-specific consent (RSC), bots can receive all channel messages in teams that it's installed in without being @mentioned. For more information, see [receive all channel messages with RSC](channel-messages-with-rsc.md).
+> * Using resource-specific consent (RSC), bots can receive all channel messages in teams that it's installed in without being @mentioned. For more information, see [receive all channel messages with RSC](channel-messages-with-rsc.md).
>
-> Posting a message or Adaptive Card to a private channel is currently not supported.
+> * Posting a message or Adaptive Card to a private channel is currently not supported.
See the following video to learn about channel and group chat conversations with a bot: <br>
platform Notification Bot In Teams https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/bots/how-to/conversations/notification-bot-in-teams.md
Title: Notification bot in Teams
description: Learn how a notification bot works in Teams, and to customize notification behavior. -+ ms.localizationpriority: high
You need to create `ConversationBot` to send notification.
/** Javascript/Typescript: bot/src/internal/initialize.*s **/ const bot = new ConversationBot({ // The bot id and password to create BotFrameworkAdapter.
- // See https://aka.ms/about-bot-adapter to learn more about adapters.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about adapters.
adapterConfig: { appId: process.env.BOT_ID, appPassword: process.env.BOT_PASSWORD,
const myStorage = new MyStorage(...);
// initialize ConversationBot with notification enabled and customized storage const bot = new ConversationBot({ // The bot id and password to create BotFrameworkAdapter.
- // See https://aka.ms/about-bot-adapter to learn more about adapters.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about adapters.
adapterConfig: { appId: process.env.BOT_ID, appPassword: process.env.BOT_PASSWORD,
platform Send Proactive Messages https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/bots/how-to/conversations/send-proactive-messages.md
public class NotifyController : ControllerBase
private async Task BotCallback(ITurnContext turnContext, CancellationToken cancellationToken) { // If you encounter permission-related errors when sending this message, see
- // https://aka.ms/BotTrustServiceUrl
+ // https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-proactive-message?view=azure-bot-service-4.0&tabs=csharp#avoiding-401-unauthorized-errors
// Sends an activity to the sender of the incoming activity. await turnContext.SendActivityAsync("proactive hello"); }
Example of a code snippet to demonstrate creating conversation reference.
``` # [TypeScript](#tab/typescript)+ * [SDK reference](/javascript/api/botbuilder-core/turncontext?view=botbuilder-ts-latest#botbuilder-core-turncontext-getconversationreference&preserve-view=true) * [Sample code reference](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/graph-proactive-installation/nodejs/bots/proactiveBot.js#L59)
async messageAllMembersAsync(context) {
``` # [Python](#tab/python)+ * [SDK reference](/python/api/botbuilder-core/botbuilder.core.botframeworkadapter?view=botbuilder-py-latest#botbuilder-core-botframeworkadapter-create-conversation&preserve-view=true) * [Sample code reference](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/main/samples/bot-conversation/python/bots/teams_conversation_bot.py#L200)
platform Get Teams Context https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/bots/how-to/get-teams-context.md
export class MyBot extends TeamsActivityHandler {
constructor() { super();
- // See https://aka.ms/about-bot-activity-message to learn more about the message and other activity types.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about the message and other activity types.
this.onMessage(async (turnContext, next) => { var continuationToken; var members = [];
export class MyBot extends TeamsActivityHandler {
constructor() { super();
- // See https://aka.ms/about-bot-activity-message to learn more about the message and other activity types.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about the message and other activity types.
this.onMessage(async (turnContext, next) => { const member = await TeamsInfo.getMember(turnContext, encodeURI('someone@somecompany.com'));
export class MyBot extends TeamsActivityHandler {
constructor() { super();
- // See https://aka.ms/about-bot-activity-message to learn more about the message and other activity types.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about the message and other activity types.
this.onMessage(async (turnContext, next) => { // Gets the details for the given team id.
export class MyBot extends TeamsActivityHandler {
constructor() { super();
- // See https://aka.ms/about-bot-activity-message to learn more about the message and other activity types.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about the message and other activity types.
this.onMessage(async (turnContext, next) => { // Supports retrieving channels hosted by a team.
platform Msgex Sso Code https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/includes/messaging-extensions/msgex-sso-code.md
To update your app's code:
1. Add code snippet for `TeamsSSOTokenExchangeMiddleware`.
- # [csharp](#tab/cs1)
+# [csharp](#tab/cs1)
- Add the following code snippet to `AdapterWithErrorHandler.cs` (or the equivalent class in your app's code):
+Add the following code snippet to `AdapterWithErrorHandler.cs` (or the equivalent class in your app's code):
- ```csharp
+```csharp
base.Use(new TeamsSSOTokenExchangeMiddleware(storage, configuration["ConnectionName"])); ```
- # [JavaScript](#tab/js1)
+# [JavaScript](#tab/js1)
- Add the following code snippet to `index.js` (or the equivalent class in your app's code):
+Add the following code snippet to `index.js` (or the equivalent class in your app's code):
- ```JavaScript
+```JavaScript
const {TeamsSSOTokenExchangeMiddleware} = require('botbuilder'); const tokenExchangeMiddleware = new TeamsSSOTokenExchangeMiddleware(memoryStorage, env.connectionName); adapter.use(tokenExchangeMiddleware);
To update your app's code:
1. Use the following code snippet for requesting a token.
- # [csharp](#tab/cs2)
+# [csharp](#tab/cs2)
- After you add the `AdapterWithErrorHandler.cs`, your code should be as shown below:
+After you add the `AdapterWithErrorHandler.cs`, your code should be as shown below:
- ```csharp
+```csharp
public class AdapterWithErrorHandler : CloudAdapter { public AdapterWithErrorHandler(
To update your app's code:
{ // Log any leaked exception from the application. // NOTE: In production environment, you should consider logging this to
- // Azure Application Insights. Visit https://aka.ms/bottelemetry to see how
+ // Azure Application Insights. Visit https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-telemetry?view=azure-bot-service-4.0&tabs=csharp to see how
// to add telemetry capture to your bot. logger.LogError(exception, $"[OnTurnError] unhandled error : {exception.Message}");
To update your app's code:
} ```
- # [JavaScript](#tab/js2)
+# [JavaScript](#tab/js2)
- After you add the code to `index.js`, your code should be as shown below:
+After you add the code to `index.js`, your code should be as shown below:
- ```JavaScript
+```JavaScript
// index.js is used to setup and configure your bot. // Import required packages.
To update your app's code:
const restify = require('restify'); // Import required bot services.
- // See https://aka.ms/bot-services to learn more about the different parts of a bot.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about the different parts of a bot.
const { CloudAdapter, ConversationState,
To update your app's code:
console.log(`\n${ conname } is the con name`); // Create adapter.
- // See https://aka.ms/about-bot-adapter to learn more about how bots work.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0 to learn more about how bots work.
const adapter = new CloudAdapter(botFrameworkAuthentication); const memoryStorage = new MemoryStorage(); const tokenExchangeMiddleware = new TeamsSSOTokenExchangeMiddleware(memoryStorage, env.connectionName);
To update your app's code:
adapter.use(tokenExchangeMiddleware); adapter.onTurnError = async (context, error) => { // This check writes out errors to console log .vs. app insights.
- // NOTE: In production environment, you should consider logging this to Azure application insights. See https://aka.ms/bottelemetry for telemetry configuration instructions.
+ // NOTE: In production environment, you should consider logging this to Azure application insights. See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-telemetry?view=azure-bot-service-4.0&tabs=csharp for telemetry configuration instructions.
console.error(`\n [onTurnError] unhandled error: ${ error }`); // Send a trace activity, which will be displayed in Bot Framework Emulator.
To update your app's code:
}; // Define the state store for your bot.
- // See https://aka.ms/about-bot-state to learn more about using MemoryStorage.
+ // See https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-v4-state?view=azure-bot-service-4.0&branch=live&tabs=csharp to learn more about using MemoryStorage.
// A bot requires a state storage system to persist the dialog and user state between messages. //const memoryStorage = new MemoryStorage();
platform Collaboration Control https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/samples/collaboration-control.md
These controls give you the power to simplify your users workflow collaboration
* Tasks > [!NOTE]
-> Currently Collaboration controls are available only in [public developer preview](~/resources/dev-preview/developer-preview-intro.md).
+> Collaboration controls are available only in [public developer preview](~/resources/dev-preview/developer-preview-intro.md).
Following are some of the key capabilities of Collaboration controls:
platform Teams Low Code Solutions https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/samples/teams-low-code-solutions.md
You can [create flows to automate repetitive work tasks](https://flow.microsoft.
[Power Virtual Agents](/power-virtual-agents/fundamentals-what-is-power-virtual-agents) is a no code, guided graphical interface solution, built on the Microsoft Power Platform and the Bot Framework. It empowers every member of your team to create and maintain rich, conversational chatbots that easily integrate with the Teams platform. All content authored in Power Virtual Agents renders naturally in Teams and Power Virtual Agents bots engage with users in the Teams native chat canvas. You can [integrate your Power Virtual Agents chatbot](/power-virtual-agents/publication-add-bot-to-microsoft-teams) to Teams through the [Power Virtual Agents portal](https://powervirtualagents.microsoft.com).
-Use the new [Power Virtual Agents app](https://aka.ms/pva-teams-docs) in Teams, to create, manage, and publish conversational chatbots easily from within Teams. You can share your bots with other people in your organization to chat and get answers for their questions.
+Use the new [Power Virtual Agents](/power-virtual-agents/teams/fundamentals-what-is-power-virtual-agents-teams) app in Teams, to create, manage, and publish conversational chatbots easily from within Teams. You can share your bots with other people in your organization to chat and get answers for their questions.
### Γ£ö Virtual Assistant for Teams
platform People Picker https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/task-modules-and-cards/cards/people-picker.md
The following image shows the reassignment scenario:
# [Mobile](#tab/mobile)
-> [!NOTE]
-> Currently, this feature is available in [Public developer preview for Teams](../../resources/dev-preview/developer-preview-intro.md#public-developer-preview-for-teams) only.
- Android and iOS mobile clients support People Picker in Adaptive Cards. You can use People Picker in mobile to search and select user to enhance user experience. The search experience is similar to any other user selection experience in mobile. ### Reassignment scenario example
platform Debug Local https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/toolkit/debug-local.md
Title: Debug your Teams app locally description: In this module, learn how to debug your Teams app locally in Teams Toolkit.-+ ms.localizationpriority: high Last updated 03/21/2022
Teams Toolkit helps you to debug and preview your Microsoft Teams app locally. D
Teams Toolkit in Microsoft Visual Studio Code gives you the features to automate debugging of your Teams app locally. Visual Studio Code allows you to debug tab, bot, and message extension. You need to set up Teams Toolkit before you debug your app. > [!NOTE]
->
> You can upgrade your old Teams Toolkit project to use new tasks, for more information, see [debug settings doc](https://aka.ms/teamsfx-debug-upgrade-new-tasks) ## Set up your Teams Toolkit for debugging
Perform the following steps using the Teams Toolkit to debug your app after you
:::image type="content" source="../assets/images/debug-teams-app/vs-localdebug-signin-m365.png" alt-text="Sign in to Microsoft 365 account"::: > [!Note]
- > Learn more about sideloading permission by visiting <https://aka.ms/teamsfx-sideloading-option>.
+ > Learn more about sideloading permission by visiting [Prepare your Microsoft 365 tenant](../concepts/build-and-test/prepare-your-o365-tenant.md).
1. Select **Debug** > **Start Debugging**, or directly select **F5**.
Perform the following steps using the Teams Toolkit to debug your app after you
Visual Studio launches the Teams app inside Microsoft Teams client in your browser. > [!Note]
- > Learn more by visiting <https://aka.ms/teamsfx-vs-debug>.
+ > Learn more by visiting [Teams Toolkit Overview](teams-toolkit-fundamentals.md).
1. After Microsoft Teams is loaded, select **Add** to install your app in Teams.
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
| 08/03/2022 | Mute and unmute APIs for apps in Teams meeting stage | Build apps for Teams meetings and calls > [Meeting apps API references](/microsoftteams/platform/apps-in-teams-meetings/api-references?tabs=dotnet) | | 08/02/2022| Collaboration controls for Teams| Integrate with Teams > [Collaboration controls](samples/collaboration-control.md) | |05/24/2022| Enhanced collaboration with Live Share SDK | Build apps for Teams meetings > Enhanced collaboration with Live Share > [Overview](apps-in-teams-meetings/teams-live-share-overview.md) |
-| 02/03/2022 | Introduced app manifest version 1.13 | App manifest > Public developer preview > [Manifest schema](resources/schem) |
| 01/17/2022 | People Picker in Adaptive cards for mobile | Build cards and task modules > Build cards > [People Picker in Adaptive Cards](task-modules-and-cards/cards/people-picker.md)| | 10/28/2021 |Bots can be enabled to receive all channel messages using resource-specific consent (RSC) | ΓÇó Build bots > Bot conversations > [bot conversation overview](~/bots/how-to/conversations/conversation-basics.md) </br> ΓÇó Build bots > Bot conversations > [channel and group conversations](~/bots/how-to/conversations/channel-and-group-conversations.md) | | 06/16/2021 | Resource-specific consent for chats | ΓÇó Utilize Teams data with Microsoft Graph > [Resource-specific consent](graph-api/rsc/resource-specific-consent.md) </br> ΓÇó Test your app > Microsoft Graph > [Test resource-specific consent permissions in Teams](graph-api/rsc/test-resource-specific-consent.md)|