Update bot-message-extension sample with teams sdk 2.1 - #2391
Open
AjayJ12-MSFT wants to merge 5 commits into
Open
Update bot-message-extension sample with teams sdk 2.1#2391AjayJ12-MSFT wants to merge 5 commits into
AjayJ12-MSFT wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the TeamsSDK bot-message-extension (.NET) sample to use the Microsoft Teams SDK 2.1 surface area, including new message extension APIs and Azure AD configuration keys.
Changes:
- Migrates the bot wiring from the older Teams ASP.NET Core plugin to
Microsoft.Teams.Apps/Microsoft.Teams.CardsAPIs. - Updates configuration from
Teams:*settings toAzureAd:*(including client credential array format). - Adjusts local launch settings to reflect the new AzureAd environment variable names.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| samples/TeamsSDK/bot-message-extensions/dotnet/bot-message-extensions/Program.cs | Refactors message extension handlers and attachment/response creation to the Teams SDK 2.1 API surface. |
| samples/TeamsSDK/bot-message-extensions/dotnet/bot-message-extensions/BotMessageExtensions.csproj | Replaces old package dependency with Teams SDK 2.1 packages. |
| samples/TeamsSDK/bot-message-extensions/dotnet/bot-message-extensions/appsettings.json | Renames/configures auth settings under AzureAd with client credential array. |
| samples/TeamsSDK/bot-message-extensions/dotnet/bot-message-extensions/Properties/launchSettings.EXAMPLE.json | Updates env var names and adds a flag that bypasses auth for local runs. |
Suppressed comments (1)
samples/TeamsSDK/bot-message-extensions/dotnet/bot-message-extensions/Program.cs:138
CreateSearchResultAttachmentbuilds a ThumbnailCard payload with only title/text, so users can't open the Wikipedia article from the result. Add an OpenUrl button (and accept the URL as an argument) so selecting a result stays useful.
static TeamsAttachment CreateSearchResultAttachment(string title, string text)
{
return TeamsAttachment.CreateBuilder()
.WithContent(new { title, text })
.WithContentType(AttachmentContentTypes.ThumbnailCard)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Changed AzureAd setting to disallow unauthenticated requests.
Mehak Bindra (MehakBindra)
approved these changes
Aug 31, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.