We’ve heard you and we’ve delivered, the Microsoft Teams C# sample app is here! This sample app will give you all the tools you need to start developing for Microsoft Teams.
The sample app has two goals:
To get the sample app up and running, follow the directions below or in the readme.md file in Github.
Steps to see the bot running in Bot Emulator
NOTE: Teams does not work nor render things exactly like the Bot Emulator, but it is a quick way to see if your bot is running and functioning correctly.
Congratulations! You can now chat with the bot in the Bot Emulator!
Steps to see the full app in Microsoft Teams
ngrok http 3979 --host-header=localhost
Bots in Teams must be built upon the Microsoft Bot Framework. For this sample, as part of the package download process, you’ll get the Bot Framework SDK and the Microsoft Teams extensions to Bot Framework.
In addition, every bot must be registered in the Bot Framework, so it is accessible by the services it uses like Microsoft Teams. Our samples are designed for you to run yourself, so you’ll need to create your own bot, which also includes a Microsoft App ID and password. Here’s how:
Next, you need to configure your bot’s service endpoint so Microsoft Teams knows how to connect to your bot:
Here is an example for reference:
<add key="BotId" value="Bot_Handle_Here" /> <add key="MicrosoftAppId" value="88888888-8888-8888-8888-888888888888" /> <add key="MicrosoftAppPassword" value="aaaa22229999dddd0000999" /> <add key="BaseUri" value="https://#####abc.ngrok.io" />
Congratulations! You have just created and sideloaded your first Microsoft Teams app! Try adding a configurable tab or at-mentioning your bot in a channel by its registered name (@Sample-App-csharp Hello).
If C# isn’t your language of choice, you may be interested in the Node.js version instead: https://github.com/OfficeDev/microsoft-teams-sample-complete-node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.