Skip to content

Bug bash fixes: Msgextension cardbutton clicked, onsetting added, activity preview fix, SSO status reconciliation - #630

Merged
MehakBindra merged 6 commits into
mainfrom
mehak/core-bugbash
Jul 30, 2026
Merged

Bug bash fixes: Msgextension cardbutton clicked, onsetting added, activity preview fix, SSO status reconciliation#630
MehakBindra merged 6 commits into
mainfrom
mehak/core-bugbash

Conversation

@MehakBindra

@MehakBindra MehakBindra commented Jul 29, 2026

Copy link
Copy Markdown
Member

This pull request introduces significant improvements and new features to the MessageExtensionBot sample, streamlines configuration for several other samples, and enhances code maintainability and clarity. The most notable changes include the addition of a working message extension settings flow (with UI and manifest updates), improved adaptive card actions, and the migration of sensitive configuration from environment variables to appsettings for better local development experience.

Message Extension Settings & Actions

  • Added a static settings page (wwwroot/settings.html) for message extension configuration, with Teams SDK integration for saving/cancelling settings.
  • Implemented the OnQuerySettingUrl and OnSetting handlers in Program.cs to support opening and saving extension settings, including proper manifest and domain configuration. [1] [2] [3] [4] [5]
  • Updated manifest guidance and documentation to clarify canUpdateConfiguration placement and required validDomains for settings. (F2f34638L2R2, [1] [2]

Adaptive Card and Action Improvements

  • Added a "View Details" button (OpenUrlAction) to adaptive cards in CreateSelectItemCard, and handled card button clicks in the bot with the new OnCardButtonClicked handler. [1] [2]
  • Refactored adaptive card response creation to remove unused parameters and simplify usage. [1] [2]

Configuration and Environment Variable Migration

  • Moved OpenAI and bot configuration from environment variables to appsettings/launch settings for ObservabilityBot, ExtAIBot, and McpServer samples, and updated documentation accordingly. [1] [2] [3] [4] [5] [6] [7] [8]

Codebase and Documentation Cleanup

  • Updated and clarified README files for multiple samples to reflect new configuration patterns and manifest requirements, and removed redundant or outdated setup instructions. [1] [2] [3] [4] [5] [6]

Other Enhancements

  • Improved helper method type safety for extracting preview card data. [1] [2]
  • Enabled static file serving for the settings page in the bot web app.

These changes collectively make the samples more robust, easier to configure, and better aligned with Teams extensibility best practices.

- StreamingBot/ObservabilityBot: migrate to AzureOpenAI__ config format
- ObservabilityBot: wire ConnectionStrings__AppInsights for App Insights
- ObservabilityBot: inject IConfiguration for deployment name lookup
- OAuthFlowBot: print token statuses as indented JSON
- UserTokenClient: print GetTokenStatus response as indented JSON
- Context.GetConnectionStatusAsync: reconcile GetTokenStatus results with
  GetTokenAsync per-connection to fix SSO showing as not connected

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ba86bba6-7d8e-4502-81fd-45e0e9ea6617
Copilot AI review requested due to automatic review settings July 29, 2026 23:50
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@MehakBindra MehakBindra changed the title Bug bash fixes: sample config, SSO status reconciliation, debug logging Bug bash fixes: sample config, SSO status reconciliation Jul 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Bug-bash updates across core SDK and sample bots to align configuration with AzureOpenAI__* conventions, improve ObservabilityBot telemetry wiring, and fix OAuth/SSO connection status reporting.

Changes:

  • Updated sample configuration/docs to use AzureOpenAI__{Endpoint,ApiKey,Deployment} (and ConnectionStrings__AppInsights) instead of legacy env var names.
  • Enhanced Context.GetConnectionStatusAsync to reconcile GetTokenStatus results with per-connection GetTokenAsync to address silent SSO status mismatches.
  • Simplified token status array construction in UserTokenClient.GetTokenStatusAsync using collection expressions.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
core/src/Microsoft.Teams.Core/UserTokenClient.cs Simplifies GetTokenStatusAsync return construction using collection expressions.
core/src/Microsoft.Teams.Apps/Context.cs Reconciles token status with per-connection token retrieval to improve SSO status accuracy.
core/samples/StreamingBot/README.md Updates sample setup docs to the AzureOpenAI__* config format.
core/samples/StreamingBot/Properties/launchSettings.TEMPLATE.json Removes legacy AZURE_OPENAI_* env vars from the template.
core/samples/StreamingBot/Program.cs Reads Azure OpenAI settings from AzureOpenAI:* configuration keys.
core/samples/ObservabilityBot/README.md Updates prerequisites/export-target docs and config key names.
core/samples/ObservabilityBot/Properties/launchSettings.TEMPLATE.json Switches App Insights and Azure OpenAI settings to config-style keys.
core/samples/ObservabilityBot/Program.cs Wires Azure Monitor exporter connection string via ConnectionStrings:AppInsights and updates Azure OpenAI config reads.
core/samples/ObservabilityBot/ObservabilityBotApp.cs Uses injected IConfiguration to fetch deployment name (instead of env var).
core/samples/GraphBot/README.md Removes local config section from the GraphBot sample docs.
core/samples/ExtAIBot/README.md Updates Azure OpenAI configuration documentation formatting/keys.
core/samples/CustomHosting/README.md Minor README formatting tweak.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/samples/ObservabilityBot/Program.cs
Comment thread core/samples/ObservabilityBot/README.md
Comment thread core/src/Microsoft.Teams.Apps/Context.cs
@MehakBindra MehakBindra changed the title Bug bash fixes: sample config, SSO status reconciliation Bug bash fixes: Msgextension activity preview, SSO status reconciliation Jul 30, 2026
@MehakBindra MehakBindra changed the title Bug bash fixes: Msgextension activity preview, SSO status reconciliation Bug bash fixes: Msgextension activity preview, onsetting, SSO status reconciliation Jul 30, 2026
@MehakBindra MehakBindra changed the title Bug bash fixes: Msgextension activity preview, onsetting, SSO status reconciliation Bug bash fixes: Msgextension cardbutton clicked, onsetting added, activity preview fix, SSO status reconciliation Jul 30, 2026
Comment thread core/src/Microsoft.Teams.Apps/Context.cs
@MehakBindra
MehakBindra added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit c7ec4f3 Jul 30, 2026
9 checks passed
@MehakBindra
MehakBindra deleted the mehak/core-bugbash branch July 30, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants