A bot, chatbot, or conversational bot is an application that responds to simple commands sent in a chat and provides meaningful replies. The interaction with a bot can be a quick question and answer or a complex conversation.
This is a simple "Hello World" application that has both Bot and Tab capabilities. The bot sends a welcome message when a new member is added, while the tab displays a welcome page.
- How to use Teams Toolkit to create a Teams app with both Bot and Tab capabilities.
- Node.js, supported versions: 18, 20, 22
- An M365 account. If you do not have M365 account, apply one from M365 developer program
- Teams Toolkit Visual Studio Code Extension version 5.0.0 and higher or Teams Toolkit CLI
-
From VS Code:
- hit
F5
to start debugging. Alternatively open theRun and Debug Activity
Panel and selectDebug in Teams (Edge)
orDebug in Teams (Chrome)
.
- hit
-
From Teams Toolkit CLI:
- Install dev tunnel cli.
- Login with your M365 Account using the command
devtunnel user login
. - Start your local tunnel service by running the command
devtunnel host -p 3978 --protocol http --allow-anonymous
. - In the
env/.env.local
file, fill in the values forBOT_DOMAIN
andBOT_ENDPOINT
with your dev tunnel URL.BOT_DOMAIN=sample-id-3978.devtunnels.ms BOT_ENDPOINT=https://sample-id-3978.devtunnels.ms
- Run command:
teamsapp provision --env local
. - Run command:
teamsapp deploy --env local
. - Run command:
teamsapp preview --env local
.
-
From VS Code:
- Sign into Azure by clicking the
Sign in to Azure
under theACCOUNTS
section from sidebar. - Click
Provision
fromLIFECYCLE
section or open the command palette and select:Teams: Provision
. - Click
Deploy
or open the command palette and select:Teams: Deploy
.
- Sign into Azure by clicking the
-
From Teams Toolkit CLI:
- Run command:
teamsapp auth login azure
. - Run command:
teamsapp provision --env dev
. - Run command:
teamsapp deploy --env dev
.
- Run command:
-
From VS Code:
- Open the
Run and Debug Activity
Panel. SelectLaunch Remote (Edge)
orLaunch Remote (Chrome)
from the launch configuration drop-down.
- Open the
-
From Teams Toolkit CLI:
- Run command:
teamsapp preview --env dev
.
- Run command:
Microsoft Teams provides a mechanism by which an application can obtain the signed-in Teams user token to access Microsoft Graph (and other APIs). Teams Toolkit facilitates this interaction by abstracting some of the Azure Active Directory (AAD) flows and integrations behind some simple, high-level APIs. This enables you to add single sign-on (SSO) features easily to your Teams application.
Please follow this document to add single sign on for your project.
Date | Author | Comments |
---|---|---|
Dec 9, 2022 | hund030 | Onboard sample in Teams Toolkit V5.0.0 |
We really appreciate your feedback! If you encounter any issue or error, please report issues to us following the Supporting Guide. Meanwhile you can make recording of your journey with our product, they really make the product better. Thank you!