Connect a bot to Microsoft Teams
APPLIES TO: SDK v4
Test a bot in Microsoft Teams
Adding a bot by GUID, for anything other than testing purposes, is not recommended. Doing so severely limits the functionality of a bot. Bots in production should be added to Teams as part of an app. Read Create a bot and Test and debug your Microsoft Teams bot in the Microsoft Teams documents for more information.
To add the Microsoft Teams channel, open the bot in the Azure portal, click the Channels blade, and then click Teams.
Next, click Save.
After adding the Teams channel, go to the Channels page and click on Get bot embed code.
Copy the https part of the code that is shown in the Get bot embed code dialog. For example,
In the browser, paste this address and then choose the Microsoft Teams app (client or web) that you use to add the bot to Teams. You should be able to see the bot listed as a contact that you can send messages to and receives messages from in Microsoft Teams.
When switching between local development, staging, or production environments, use one bot channel registration per environment, to avoid changing the endpoint repeatedly.
Deleting the Teams channel registration will cause a new pair of keys to be generated when it is re-enabled. This invalidates all 29:xxx and a:xxx IDs that the bot may have stored for proactive messaging.