Skip to content

Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!

License

Notifications You must be signed in to change notification settings

southworks/Microsoft-Teams-Samples

 
 

Repository files navigation

Microsoft Teams Samples

Sample code build status

NOTE: These samples are designed to help understand Microsoft Teams platform capabilities and scenarios. If you are looking for production ready apps then please visit App Templates for Microsoft Teams

The easy way to browse through all the samples is to visit the Microsoft 365 Sample Solution Gallery

Sample lists

  1. Copilot for Microsoft 365 plugin samples
  2. Teams Toolkit samples
  3. Getting Started Samples and Tutorials
  4. Tabs samples
  5. Bots samples (using the v4 SDK)
  6. Messaging Extensions samples (using the v4 SDK)
  7. Webhooks and Connectors samples
  8. Graph APIs
  9. Calls and online meetings bots
  10. Meetings samples
  11. Actions Preview
  12. Scenario specific samples
Name Description .NET TypeScript JavaScript
Northwind Inventory Plugin that allows users to query the Northwind Database View View
Document Search Plugin that enables Hybrid Search (Vector + Semantic) View View
Product support Plugin that allows users to query the Products held in SharePoint Online team site via Microsoft Graph View
Multi Parameters Plugin that demonstrates how to implement complex utterances and support deep retrieval View View View

The Teams Toolkit is an extension on Visual Studio Code and Visual Studio. It enable Teams developers to create and deploy Teams apps with integrated identity, access to cloud storage, data from Microsoft Graph, and other services in Azure and M365 with a "zero-configuration" approach to the developer experience. And Sample Apps are provided in Teams Toolkit. Download and try it by today! Learn more about Teams Toolkit.

Sample Name Description C# TypeScript App Manifest
1 Hello World Microsoft Teams hello world sample app. View View toolkit-icon View
Sample Name Description C# JavaScript App Manifest
1 api-doc-search This is a sample API application that demonstrates how to perform RAG-based semantic search using NoSQL CosmosDB. View -
2 Compliance Checker Use Azure OpenAI to compare proposal documents against a guideline document and return whether the proposal complies and why/why not. View toolkit-icon View
3 bot-ai-meeting-helper This sample demonstrates how Azure Open AI extracts action items from meeting transcriptions for all participants who subscribed to the meeting, and subsequently sends these action items to each individual user in a 1:1 chat after the meeting concludes. View toolkit-icon View
4 bot-virtual-assistant This is a sample application that demonstrates a root bot that routes inputs to skill bots for tailored responses. View -
5 msgext-expert-finder-js This sample implements a Teams message extension that can be used to query a database of candidates based on their skills, location and availability. The sample, when used with Copilot for M365, demonstrates SSO, and Copilot's ability to perform multi-parameter search. View -
Sample Name Description C# TypeScript JavaScript App Manifest
1 Personal tabs Sample app showing custom personal Tab with ASP. NET Core MVC, Razor Yeoman Generator View
2 Personal tab quick-start Sample personal tab quick-start app. View toolkit-icon View toolkit-icon
3 Personal tab with SSO quick-start Sample personal tab with SSO hello world app. View View toolkit-icon View toolkit-icon
4 Channel and group tabs Sample app showing custom group and channel Tab with ASP. NET Core MVC, Razor Yeoman Generator View
5 Channel and group tab quick-start Sample channel and group tab hello world app. View toolkit-icon View toolkit-icon View
6 Channel and group tab with SSO quick-start Sample channel and group tab with SSO hello world app. View View toolkit-icon View toolkit-icon
7 SPFx Tab Sample app showing Microsoft Teams tabs using SharePoint Framework View
8 Tab SSO Microsoft Teams sample app for tabs Azure AD SSO View View toolkit-icon
9 Config Tab Authentication Microsoft Teams sample app for config tabs Azure AD authentication View View
10 Deep Link consuming Subentity ID Microsoft Teams sample app for demonstrating deeplink from Bot chat to Tab consuming Subentity ID View View toolkit-icon
11 Integrate graph toolkit component in teams tab Microsoft Teams tab sample app for demonstrating graph toolkit component View View toolkit-icon
12 Device permissions Microsoft Teams tab sample app for demonstrating device permissions View toolkit-icon View
13 Build tabs with Adaptive Cards Microsoft Teams tab sample code which demonstrates how to Build tabs with Adaptive Cards View View toolkit-icon View
14 Tab in stage view Microsoft Teams tab sample app for demonstrating tab in stage view View View toolkit-icon View
15 Create Conversational tab Microsoft Teams tab sample app for demonstrating create conversation tab View View toolkit-icon View
16 Product inspection Demonstrating a feature where user can scan a product and mark it as approved/rejected. View View toolkit-icon View
17 Staggered Permission This sample demos to get staggered graph api permissions. View View toolkit-icon View
18 Tab people picker This is an tab app which shows the feature of client sdk people picker. View View toolkit-icon View
19 Tab channel context This sample shows the contents of tab context object in a private and shared channel. View toolkit-icon
20 Tab app monetization This sample shows how to open purchase dialog and trigger purchase flow using teams-js sdk. View toolkit-icon
21 Personal Tab with Nav-Bar menu Add multiple actions to the upper right in Nav-Bar and build an overflow menu for extra actions in an app. View toolkit-icon
22 App Caching in Meetings This sample shows how to improve the subsequent loading time of an App. View toolkit-icon
23 Tab Multi Hub Interact with the user's calendar, mail, profile, geolocation from personal tabs app. View toolkit-icon
24 tab-ui-templates This sample app can help you better understand how apps should look and behave in Microsoft Teams. The app includes examples of tested, high-quality UI templates that work across common Teams use cases (such as dashboards or forms). View toolkit-icon
25 Tab External Auth This sample illustrates how to implement Google auth using external auth providers. View
26 Tab Meeting Tanscript Recording This sample shows meeting transcripts and recordings. View View toolkit-icon
27 Tab DeepLink Pass Values Microsoft Teams sample which displays deeplinks based on the values passed dynamically to the context. View
28 Tab Meeting Recording and transcript with auto recording This sample shows meeting recording and transcript with auto recording. View
29 Offline Support Tickets This sample app demonstrates a classic CRUD application that functions offline within Microsoft Teams. When the Android device reconnects to the internet, users can sync their data with blob storage. View toolkit-icon View
30 Nested App Authentication This sample shows nested app authentication (NAA) is a new protocol that simplifies single sign-on (SSO) for single page applications. View View toolkit-icon

Bots samples (using the v4 SDK)

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

Sample Name Description .NET JavaScript Python Java App Manifest
1 Teams Conversation Bot quick-start Messaging and conversation event handling hello world. View toolkit-icon
2 Teams Conversation Bot SSO quick-start Messaging and conversation event handling hello world with SSO. View View toolkit-icon
3 Teams Conversation Bot Messaging and conversation event handling also includes read receipt event functionality in personal scope. View View toolkit-icon View View View
4 Message Reactions Demonstrates how to create a simple bot that responds to Message Reactions View View toolkit-icon View View
5 Authentication with OAuthPrompt Authentication and basic messaging in Bot Framework v4. View View toolkit-icon View View View
6 Teams File Upload Exchanging files with a bot in a one-to-one conversation. View View toolkit-icon View View View
7 Task Module Demonstrating how to retrieve a Task Module and values from cards in it, for a Messaging Extension. View View toolkit-icon View View View
8 Start new thread in a channel Demonstrating how to create a new thread in a channel. View View toolkit-icon View View View
9 Universal bots Teams catering bot demonstrating how to use Universal bots in Teams View
10 Sequential workflow adaptive cards Demonstrating on how to implement sequential flow, user specific view and upto date adaptive cards in bot. View View toolkit-icon View
11 Channel messages with RSC permissions Demonstrating on how a bot can receive all channel messages with RSC without @mention. View View toolkit-icon View
12 Bot with SharePoint file to view in Teams file viewer This sample demos a bot with capability to upload files to SharePoint site and same files can be viewed in Teams file viewer. View View toolkit-icon
13 Type ahead search control on Adaptive Cards This sample shows the feature of type ahead search (static and dynamic) control in Adaptive Cards. View View toolkit-icon View
14 People picker control in Adaptive Cards This sample shows the feature of people picker control in Adaptive Cards. View View toolkit-icon View
15 Proactive Messaging sample This sample shows how to save user's conversation reference information to send proactive reminder message using Bots. This uses Teams toolkit for Visual Studio Code to provide scaffolding experience. View toolkit-icon
16 Proactive Tab Conversations Using a bot to create and store conversations that can be later used inside a sub-entity, tab conversation. This sample includes the details required to proactively message a channel from a bot, set-up and store details for channel tab conversations, and viewing channel conversations from a personal app. View
17 Suggested Actions Bot This sample shows the feature where user can send suggested actions using bot. View View toolkit-icon View
18 Adaptive Card Actions Bot This sample shows the feature where user can send adaptive card with different actions using bot. View View toolkit-icon View
19 SSO for your Adaptive Cards This sample code demonstrates how to get enable SSO authentication for your Adaptive Cards Universal Actions in bot. View View toolkit-icon
20 Different formatting on cards This sample feature shows how to use different formatting on cards using bot. View View toolkit-icon
21 Different types of cards using bot This sample shows the feature where user can interact with different types of cards using bot like Adaptive, hero, list, Office 365 Connector, receipt, sign in, and thumbnail cards and card collections. View View toolkit-icon
22 User specific views in Adaptive cards This sample shows the different ways developers can consume user specific views in Adaptive cards. View View
23 Bot configuration app with type ahead search control. This sample demonstrates the features of bot configuration and reconfiguration for both teams and group chats, including a type-ahead search (static and dynamic) control on Adaptive Cards. View [View][BotConfigurationApp#nodejs
23 Bot configuration app with auth This sample demonstrates the features of bot configuration auth and reconfiguration for both teams and group chats. View View
24 Tag mention bot This sample app demonstrates the use of tag mention funtionality in teams scope using Bot Framework. View View toolkit-icon
25 Bot All Cards Sample which demonstrates sending different types cards supported in teams using bot. View View toolkit-icon View
26 Apps in Federated This sample app allows users to easily view a list of group members. When a new member is added, their details are promptly displayed. View toolkit-icon
27 Requirement Targeting OneWay Dependency Microsoft M365 RT sample app in Node.js which specify one-way-dependency relationships between app capabilities (using elementRelationshipSet) and functionality using hostMustSupportFunctionalities. View toolkit-icon
28 Requirement Targeting Mutual Dependency Microsoft M365 RT sample app in Node.js which specify mutual-dependency relationships between app capabilities using elementRelationshipSet. View toolkit-icon

Additional samples

Sample Name Description .NET JavaScript
1 Proactive Messaging Sample to highlight solutions to two challenges with building proactive messaging apps in Microsoft Teams. View
2 Sharepoint List Bot This sample app shows the interaction between teams bot and SharePoint List, Bot saves the specified details in SharePoint List as back-end View
3 Teams Virtual Assistant Customized virtual assistant template to support teams capabilities. View

Messaging Extensions samples (using the v4 SDK)

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

Sample Name Description .NET JavaScript Python Java App Manifest
1 Messaging extensions - search quick-start Hello world Messaging Extension that accepts search requests and returns results. View toolkit-icon View
2 Messaging extensions - search Messaging Extension that accepts search requests and returns results. View View toolkit-icon View View View
3 Messaging extensions - action quick-start Hello world Messaging Extension that accepts parameters and returns a card. Also, how to receive a forwarded message as a parameter in a Messaging Extension. View toolkit-icon View
4 Messaging extensions - action Messaging Extension that accepts parameters and returns a card. Also, how to receive a forwarded message as a parameter in a Messaging Extension. View View toolkit-icon View View View
5 Messaging extensions - auth and config Messaging Extension that has a configuration page, accepts search requests and returns results after the user has signed in. View View View
6 Messaging extensions - SSO auth Messaging Extension that has a configuration page, accepts search requests and returns results with SSO. View View toolkit-icon
7 Messaging extensions - action preview Demonstrates how to create a Preview and Edit flow for a Messaging Extension. View View toolkit-icon View View View
8 Link unfurling Messaging Extension that performs link unfurling. View View toolkit-icon View View View
9 Messaging extension - Adaptive Card based loop components Demonstrates how to create Messaging extension with adaptive card-based loop components. View View toolkit-icon View
10 Messaging Extensions AI - Sentiment Analysis Messaging Extension with AI capability that performs sentiment analysis (positive/negative/neutral) for messages posted in Microsoft Teams chat View View toolkit-icon
11 Copilot Handoff This sample implements a Teams message extension that can be used as a plugin for Microsoft Copilot for Microsoft 365. The message extension showcases copilot handoff along with allowings users to query the Northwind Database View toolkit-icon

Additional samples

Sample Name Description .NET JavaScript Python
1 Link unfurling demo of Reddit Messaging Extension with Link Unfurling Samples for Reddit Links View
2 Link unfurling - setup a meeting This sample illustrates a common scenario where a user shares a link to a resource with a group of users, and they collaborate to review it in a meeting. View

Important

The existing Microsoft 365 (previously called Office 365) connectors across all cloud platforms are nearing deprecation, and the creation of new Microsoft 365 connectors will soon be blocked. For more information on the schedule and how the Workflows app provides a more flexible and secure experience, see retirement of Microsoft 365 connectors within Microsoft Teams.

Sample Name Description C# JavaScript
1 Connectors Sample Office 365 Connector generating notifications to teams channel. View View
2 Generic connectors sample Sample code for a generic connector that's easy to customize for any system which supports webhooks. View
3 Outgoing Webhooks Samples to create "Custom Bots" to be used in Microsoft Teams. View View
4 Authentication in todo Connector App This is a sample app which shows connector authentication and sends notification on task creation. View
5 Incoming Webhook This is a sample used to send card using incoming webhook. View View
Sample Name Description C# JavaScript App Manifest
1 Resource Specific Consent (RSC) This sample illustrates how you can use Resource Specific Consent (RSC) to call Graph APIs. . View View toolkit-icon View
2 Graph API Channel Life Cycle This sample illustrates how you can use Graph API Channel Life Cycle to call Graph APIs. . View View toolkit-icon
3 Graph API Teams App Installation Life Cycle This sample illustrates how you can use Teams App Installation Life Cycle by calling Microsoft Graph APIs. . View View toolkit-icon
4 Graph API Teams App Catalog Life Cycle This sample illustrates how you programmatically manage lifecycle for your teams App in catalog by calling Microsoft Graph APIs. . View View toolkit-icon View
5 Graph API Chat Life Cycle This sample illustrates how you can use Teams App Chat Life Cycle by calling Microsoft Graph APIs. . View View toolkit-icon
6 Activity Feed Notification Microsoft Teams sample app for Sending Activity feed notification using Graph API in a Teams Tab. View View toolkit-icon
7 Proactive installation of App and sending proactive notifications This sample illustrates how you can use Proactive installation of app for user and send proactive notification by calling Microsoft Graph APIs. View View toolkit-icon View
8 Change Notification This sample app demonstrates sending change notifications to user presence in Teams based on user presence status. View View toolkit-icon
9 Graph Pinned Message This is a sample application which demonstrates how to pin messages in chat using Graph api. View View toolkit-icon
10 Graph Bulk Meetings This is an sample application which shows how to create Teams meetings in bulk using Graph api. View View toolkit-icon
11 Graph Meeting Notification This is a sample application which demonstrates the use of online meeting subscription and sends you the notifications in chat using bot. View View toolkit-icon
12 Change Notifications Team/Channel This sample application which demonstrates use of Team/Channel subscription that will post notifications when user create/edit/delete team/channel using Graph api. View View toolkit-icon
13 graph-teams-tag This is a sample application which demonstrates how to use CRUD Graph operations within tab related to team tags. View View toolkit-icon
14 Graph API Explorer for RSC Resource-specific consent (RSC) is a Microsoft Teams and Microsoft Graph API integration that enables your app to use API endpoints to manage specific teams within an organization View toolkit-icon
Sample Name Description C#
1 Calling and Meeting bot This sample app demonstrate how a Bot can create a call, join a meeting and transfer the call View
2 Local Media Samples Local media samples give the developer direct access to the inbound and outbound media streams. View
3 Remote Media Samples The Incident Bot sample is a Remote Media sample demonstrating a simple incident process workflow started by a Calling Bot.. View
Sample Name Description C# JavaScript App Manifest
1 Meetings Extensibility Microsoft Teams meeting extensibility sample: token passing View View toolkit-icon
2 Meetings notification Microsoft Teams meeting extensibility sample for interacting with in-meeting notifications View View toolkit-icon
3 Meetings SidePanel Microsoft Teams meeting extensibility sample for iteracting with Side Panel in-meeting View View toolkit-icon
4 Details Tab in Meetings Microsoft Teams meeting extensibility sample for iteracting with Details Tab in-meeting View View toolkit-icon View
5 Meetings Stage View Enable and configure your apps for Teams meetings to use in stage view View View toolkit-icon View
6 Meeting Events Get real time meeting events View View toolkit-icon View
7 Meeting Recruitment App Sample app showing meeting app experience for interview scenario. View View toolkit-icon View
8 Meeting Transcript App This is a sample application which demonstrates how to get Transcript using Graph API and show it in the task module. View View toolkit-icon
9 Meeting signing programmatic share to stage Demonstrating the programmatic share to stage feature, by means of a document signing in a meeting. View
10 Meeting Live Caption This is a sample meeting side panel application which demonstrates how to enable live caption in the meeting and using the CART link how to send caption in live meeting. View View toolkit-icon
11 Anonymous user support This sample app shows anonymous users support in teams meeting apps. View View toolkit-icon
12 Live coding interview using Shared meeting stage This sample demos a live coding in a teams meeting stage. View View toolkit-icon
13 Meeting-Tabs This sample shows app stage view, Mute/Unmute Teams meeting audio call and Side panel. View View toolkit-icon
14 meetings-attendance-report This is a sample application which demonstrates how to get meeting attendance report using Graph API and send it in meeting chat using bot. View View toolkit-icon
15 meetings-audio-state This is an sample tab (side panel) application which shows how to mute/unmute Teams meeting audio using toggle Incoming Client Audio API. View toolkit-icon
16 meetings-context-app This sample shows the contents of meeting tab context object in a meeting tab and using bot's meeting API, meeting participant details and meeting details are sent to user. View View toolkit-icon
Sample Name Description C# JavaScript App Manifest
1 Actions across Microsoft 365 This sample contains preview documentation for (Microsoft 365 extended Teams apps) Actions in Microsoft 365 app(microsoft365.com). View toolkit-icon

Scenario specific samples

Sample Name Description C# JavaScript App Manifest
1 Teams Dialogs (referred as task modules in TeamsJS v1.x) Sample app showing off the Teams Dialogs(referred as task modules in TeamsJS v1.x), a way to invoke custom code from a bot, a tab, or both! View View toolkit-icon View
2 Authentication Sample illustrating seamless inline authentication for Microsoft Teams apps. View
3 Complete Samples Sample covering multiple scenarios - dialogs, ME, and facebook auth. View View toolkit-icon
4 Region Selection App This app contains a bot and Tab which is helpful to set the region View View
5 App Localization Microsoft Teams app localization using Bot and Tab View View toolkit-icon View
6 App SSO Microsoft Teams app SSO for Tab, Bot, ME - search, action, linkunfurl View View toolkit-icon View
7 App Installtion using QR code This sample demos app installation using QR code of application's app id View View toolkit-icon View
8 Archive groupchat messages Demonstrating on how a bot can archive groupchat messages and send it to user as a file. View View toolkit-icon
9 App check in location Demonstrating feature where user can checkin with current location and view all previous checkins. View View toolkit-icon View
10 Message reminder setup through messaging extension Demonstrating a feature where user can schedule a task from messaging extension action command and get a reminder card at a scheduled time View View toolkit-icon View
11 Bot daily task reminder This sample demos a feature where user can schedule a recurring task and get a reminder on the scheduled time View View toolkit-icon View
12 Tab request approval Demonstrating a feature where user can raise the requests and manager will be notified about the requests and manager will be redirected to approve/reject the request from received notification. View View toolkit-icon View
13 Bot request approval Demonstrating a feature where user can send task request to his manager using universal adaptive card and manager can approve/reject the request. View View toolkit-icon View
14 Join the Team using QR code This sample demos a feature where user can join a team using QR code containing the team's id. View View toolkit-icon View
15 Activity feed broadcast Demonstrating a feature to notify any message to all members of the organisation using activity feed notification . View View toolkit-icon
16 App complete auth This sample demos authentication feature in bot,tab and messaging extension. View
17 Release Management This is a sample used to send workitem notification using Azure webhook. View View
18 Link unfurling for 'Share to teams' This sample demos the feature of link unfurling for Share to teams. View toolkit-icon
19 App Icon Badging In Microsoft Teams Meetings This sample app shows the feature of sending app icon badging in Teams' meetings. View View toolkit-icon
20 Teams Open AI Embeddings And Redis Search based On Uploaded File Using Bot This Open AI sample app demonstrates the user search functionality using Open AI embeddings and completion APIs. View toolkit-icon
21 Combined Tab and Office Add-in Demonstrates using add-in to take action on specific Office documents and using tab to aggregate data about all those specific actions. View toolkit-icon View
22 Sharepoint tab request approval This sample app demonstrates the usage of SharePoint Embedded for storage in teams. View
23 App HR talent This app simulates connection to a recruiting and talent management system and allows users and teams to create, manage and search positions and candidates. View View

Application templates

App Name Description Code
1 QBot QBot is a solution designed for classroom teaching scenarios which allows teachers, tutors, and students to intelligently answer each other's questions within the Microsoft Teams collaboration platform. View
2 Resource Hub Resource Hub is a solution designed for all the help you need to use Teams, all in one place. View

Submitting issues

The issue tracker is for issues, in other words, bugs and suggestions. If you have a question, feedback or suggestions, please check our support page.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%