{"id":20267549,"url":"https://github.com/officedev/botbuilder-microsoftteams-dotnet","last_synced_at":"2025-04-06T17:11:40.004Z","repository":{"id":60773481,"uuid":"117161804","full_name":"OfficeDev/BotBuilder-MicrosoftTeams-dotnet","owner":"OfficeDev","description":"BotBuilder's SDK extension for Microsoft Teams","archived":false,"fork":false,"pushed_at":"2023-07-07T21:32:56.000Z","size":2586,"stargazers_count":67,"open_issues_count":14,"forks_count":25,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-03-30T15:09:40.568Z","etag":null,"topics":["botframework","bots","microsoftteams","teams"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OfficeDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-11T22:36:03.000Z","updated_at":"2023-11-24T11:06:51.000Z","dependencies_parsed_at":"2024-06-18T15:21:20.722Z","dependency_job_id":null,"html_url":"https://github.com/OfficeDev/BotBuilder-MicrosoftTeams-dotnet","commit_stats":{"total_commits":94,"total_committers":13,"mean_commits":7.230769230769231,"dds":"0.43617021276595747","last_synced_commit":"1e27ff3cef84be5e58f4ce734f5fa471ffb00f1f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OfficeDev%2FBotBuilder-MicrosoftTeams-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OfficeDev%2FBotBuilder-MicrosoftTeams-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OfficeDev%2FBotBuilder-MicrosoftTeams-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OfficeDev%2FBotBuilder-MicrosoftTeams-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OfficeDev","download_url":"https://codeload.github.com/OfficeDev/BotBuilder-MicrosoftTeams-dotnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247517913,"owners_count":20951719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["botframework","bots","microsoftteams","teams"],"created_at":"2024-11-14T12:14:54.537Z","updated_at":"2025-04-06T17:11:39.984Z","avatar_url":"https://github.com/OfficeDev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# This functionality is now available in the core Bot Framework SDK\n\nThe functionality of this SDK has been migrated into the core into the core Bot Framework SDK with the 4.6 release. Please see the new samples available here: https://github.com/microsoft/BotBuilder-Samples\n\nThis package therefore has been deprecated. It may continue to function, but will receive no further updates in functionality or security patches.\n\n# Bot Builder SDK 4 - Microsoft Teams Extensions\n\nThe Microsoft Bot Builder SDK 4 Teams Extensions allow you to build bots for Microsoft Teams quickly and easily. **[Review the documentation](https://msdn.microsoft.com/en-us/microsoft-teams/bots)** to get started!\n\n## This SDK allows you to easily...\n\n* Fetch a list of channels in a team\n* Fetch profile info about all members of a team\n* Fetch tenant-id from an incoming message to bot\n* Create 1:1 chat with a specific user\n* Mention a specific user\n* Consume various events like channel-created, team-renamed, etc.\n* Accept messages only from specific tenants\n* Write Compose Extensions\n* _and more!_\n\n## Installing\n\nSimply grab the [Microsoft.Bot.Builder.Teams](https://www.nuget.org/packages/Microsoft.Bot.Builder.Teams) nuget.\n\nBot Builder SDK 4 - Microsoft Teams extensions for Node is available at https://github.com/OfficeDev/BotBuilder-MicrosoftTeams-node.\n\n## Getting started\n\n* If you don't already have it, install the Visual Studio [project template for Bot Framework V4 bot](https://marketplace.visualstudio.com/items?itemName=BotBuilder.botbuilderv4).\n* Add a reference to `Microsoft.Bot.Builder.Teams` nuget package.\n* Go to `Startup.cs` and add the following snippet of code:\n```csharp\n            services.AddBot\u003cEchoBot\u003e(options =\u003e\n            {\n                // ... other stuff snipped for brevity\n\n                // Add Teams Middleware.\n                options.Middleware.Add(\n                    new TeamsMiddleware(\n                        new ConfigurationCredentialProvider(this.Configuration)));\n\n                // ... other stuff snipped for brevity\n            });\n```\n* Now in the `OnTurnAsync` method of your bot, to do any Teams specific stuff, first grab the ITeamsContext as shown below:\n```csharp\n           var teamsContext = turnContext.TurnState.Get\u003cITeamsContext\u003e();\n```\n* And once you have `teamsContext`, you can use intellisense built into Visual Studio to discover all the operations you can do. For instance, here's how you can fetch the list of channels in the team and fetch information about the team:\n```csharp\n// Now fetch the Team ID, Channel ID, and Tenant ID off of the incoming activity\nvar incomingTeamId = teamsContext.Team.Id;\nvar incomingChannelid = teamsContext.Channel.Id;\nvar incomingTenantId = teamsContext.Tenant.Id;\n\n// Make an operation call to fetch the list of channels in the team, and print count of channels.\nvar channels = await teamsContext.Operations.FetchChannelListAsync(incomingTeamId);\nawait turnContext.SendActivityAsync($\"You have {channels.Conversations.Count} channels in this team\");\n\n// Make an operation call to fetch details of the team where the activity was posted, and print it.\nvar teamInfo = await teamsContext.Operations.FetchTeamDetailsAsync(incomingTeamId);\nawait turnContext.SendActivityAsync($\"Name of this team is {teamInfo.Name} and group-id is {teamInfo.AadGroupId}\");\n```\n\n## Samples:\nTake a look [here](CSharp/Samples).\n\nStand-alone sample can be found [here](https://github.com/OfficeDev/msteams-samples-dotnet-echobot-bf4).\n\n## Building:\n-  Install latest NodeJS from [here](https://nodejs.org/en/download/)\n-  Install Visual Studio 2017 or later\n\n### Updating Swagger spec\nIf you have updated the TeamsAPI.json. You will need to regenerate the client models\n- Delete the [Generated Models](CSharp/Microsoft.Bot.Schema.Teams/Generated)\n- Run [client model generation script](Swagger/generateclient.cmd)\n\n### Building the solution\n- Open the [Solution](CSharp/Microsoft.Bot.Builder.Teams.sln) in Visual Studio\n- Build the solution\n\n## Questions, bugs, feature requests, and contributions\nPlease review the information [here](https://msdn.microsoft.com/en-us/microsoft-teams/feedback).\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofficedev%2Fbotbuilder-microsoftteams-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fofficedev%2Fbotbuilder-microsoftteams-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofficedev%2Fbotbuilder-microsoftteams-dotnet/lists"}