Fix MessageExtensionBot create action flow - #626
Closed
heyitsaamir wants to merge 3 commits into
Closed
Conversation
Update the MessageExtensionBot sample so the create action submit returns a composed message extension result instead of a bot message preview, matching the supported create dialog flow. Also document the Teams CLI manifest update needed to enable the message extension commands and link unfurling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 82314bfe-bb27-4f78-95d4-a20c437ef3b1
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MessageExtensionBot sample to align the “create” action with the supported Teams message extension create/submit flow by returning a composed result on submit (instead of entering the bot message preview path), and updates the README with a Teams CLI command to patch a Teams app manifest.
Changes:
- Update the submit-action handler to return a
MessageExtensionResponseTypes.Resultwith an adaptive card attachment. - Add a copy/pastable
teams app manifest update --set-json ...command to wire compose extension commands + link unfurling domains.
Show a summary per file
| File | Description |
|---|---|
| core/samples/MessageExtensionBot/README.md | Adds Teams CLI instructions to update a Teams app manifest for the sample’s commands and link unfurling. |
| core/samples/MessageExtensionBot/Program.cs | Changes the create submit path to return a compose extension “result” with an adaptive card attachment (no bot message preview). |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Low
| 3. Add the message extension manifest entries to your Teams app. Replace `<TEAMS_APP_ID>` with your Teams app ID. This command works in Bash and PowerShell; the Teams CLI will prompt for the app to update: | ||
|
|
||
| ~~~bash | ||
| teams app manifest update --set-json 'composeExtensions=[{"botId":"<TEAMS_APP_ID>","commands":[{"id":"searchQuery","type":"query","title":"searchQuery","description":"Enter search text","initialRun":true,"fetchTask":false,"context":["commandBox","compose","message"],"parameters":[{"name":"searchText","title":"searchText","description":"Enter search text","inputType":"text"}]},{"id":"createAction","type":"action","title":"createAction","description":"Create a new item","initialRun":true,"fetchTask":true,"context":["commandBox","compose","message"],"parameters":[{"name":"createAction","title":"createAction","description":"Create a new item","inputType":"text"}]}],"canUpdateConfiguration":true,"messageHandlers":[{"type":"link","value":{"domains":["*.example.com"],"supportsAnonymizedPayloads":true}}]}]' |
Collaborator
Author
There was a problem hiding this comment.
actually instead, update hte cli command to unfurl microsoft.com and example.com, like the rest of the readme suggests.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
corinagum
approved these changes
Jul 29, 2026
MehakBindra
reviewed
Jul 30, 2026
Member
|
The correct fix for this is in - #630 |
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.
Summary
This tightens the MessageExtensionBot sample around the supported message extension create flow. The create dialog now produces a composed adaptive card result on submit instead of entering the bot message preview path, which avoids the client-side preview validation/rendering issues we hit while testing.
The README also gives a copy-pastable Teams CLI manifest update command so a newly created Teams app can be wired up for the sample commands and example.com link unfurling without manually editing a manifest package.
Decisions
task/fetch/task/submitsurface, but the message extension submit surface is better represented by returning a composed result, matching the Python message extension sample.*.example.comaligned with the sample instructions.