Overview
Yeoman Generator for Microsoft Teams is a useful development toolkit for Microsoft Teams development. It uses TypeScript, React and node as primary technologies.The generator allows you to simply create and scaffold projects for Microsoft Teams features.
In this article, we will create a Bot using Yo Teams.
Prerequisites
Install Yeoman, Gulp global command line interface and Typescript compiler globally using NPM.
npm install yo gulp-cli typescript --global
Install generator-teams globally using NPM.
npm install generator-teams --global
To install preview versions of the generator, run below command.
npm install generator-teams@preview --global
Register Bot in Azure
Firstly, we need to register Bot in Azure to get the App Id and secret and configure the endpoint URL.
- Open MS Azure Portal
- Click Create a resource.
- Search Bot.
- Select Bot Channels Registration.

- Click Create.
- Fill in the details to create Bot channels registration.

- Click Create.
- The new Bot channels registration is ready.

Get the App Id and secret
- From left menu, click Settings.
- Add Messaging endpoint as ngrok URL.

- Click Microsoft App ID (Manage).
- Under Certificates & secrets, create New client secret.

- Note down the values for future reference.
Configure MS Teams Channel
- From the left menu, click Channels.
- Click Configure Microsoft Teams Channel.

- Follow the instructions to configure MS Teams channel.
Yo Teams to scaffold the solution
We will generate a Bot solution using Yo Teams.
- On the command prompt, type the below command.
yo teams
- Follow the wizard to set up the bot solution.

- On the command prompt, type code . to open the solution in visual studio code.
- Follow README.md to configure your Bot in Azure.
- In the .env file, configure application ID and client secret.






Comments
Join the conversation! Your thoughts help the community grow.