Tutorials and code samples for the Microsoft Teams developer platform

Here you will find a list of tutorials and code samples that demonstrate how you can extend the Teams developer platform capabilities by creating custom apps.

Getting started with Microsoft Learn

Capability Learn module
Tabs — embedded web experiences Create embedded web experiences with tabs for Microsoft Teams
Webhooks and connectors Connect web services to Microsoft Teams with webhooks and Office 365 Connectors
Messaging extensions Task-oriented interactions in Microsoft Teams with messaging extensions
Task modules Collect input in Microsoft Teams with Task Modules
Conversational bots Create interactive conversational bots for Microsoft Teams

Getting started with code samples

To download our samples from GitHub:

  1. Select one of the projects listed below and open the project in GitHub.
  2. Choose the Clone or download button and copy the URL
  3. Open a command prompt in the parent directory into which you want to install the sample project
  4. Run git clone <pasted url>

For .NET/C# samples

Each of our .NET samples includes a Visual Studio solution file that can build the solution fully, including restoring the NuGet packages.

For Node.js samples

We provide a packages.json file that lists all required packages for a sample. Simply run npm install from the command line in your Node.js project directory to install the required packages. You're now ready to open the project in Visual Studio Code and start experimenting.

For other samples

As always, the project's README file should have more information on specific needs for specific samples.

Bots (using the v4 SDK)

Teams bot samples

For a fully working samples demonstrating some of this functionality, check out the Teams samples for Bot Framework

Sample Description .NET Core JavaScript Python
Teams Conversation Bot Messaging and conversation event handling View View View
Authentication with OAuthPrompt Authentication and basic messaging in Bot Framework v4 View View View
Teams File Upload Exchanging files with a bot in a one-to-one conversation view view view

Tip

Visit the Bot Framework Samples repository to view Microsoft Bot Framework v4 SDK task-focused samples for C#, JavaScript, TypeScript, and Python.

Messaging Extensions (using the v4 SDK)

Sample Description .NET Core JavaScript Python
Search command Simple messaging extension with a search command View View View
Action command Simple messaging extension with a action command. Response inserted into the compose message area. View View View
Action command w/bot response Messaging extension with a action command. Response inserted into the conversation by the bot. View View View
Search command messaging extension with a search command and authentication and configuration View View View

Outgoing Webhooks

Sample Description
Outgoing Webhook for C#/.NET Illustrates how to create an Outgoing Webhook for Microsoft Teams in C#/.NET.
Outgoing Webhook for Node.js Illustrates how to create a simple Outgoing Webhook for Microsoft Teams in ~50 lines of Node.js code.

Connectors

Sample Description
Sample connector for Node.js This sample, written in Node.js, showcases how to build a connector for Microsoft Teams using GitHub as an example to generate connector notifications.
Sample connector for C#/.NET This sample, written in C#, showcases how to build a connector for Microsoft Teams using a sample task list app as an example to generate connector notifications.

Graph API

Sample Description
Microsoft Graph API Samples These samples demonstrate using Microsoft Graph API calls to perform tasks such as querying teams and channels from a web service running outside Microsoft Teams.

Bot Framework SDK v3 samples

Sample Description
Sample bot for C#/.NET Bot Framework v3 samples
Sample bot for Node.js Bot Framework v3 samples