Microsoft-Teams-Samples: Dynamic typeahead search not working when card rendered in messaging extension
Steps to reproduce:
- Clone https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-type-ahead-search-adaptive-cards/nodejs.
- Add messaging extension command in manifest.json
"composeExtensions": [
{
"botId": "{{Microsoft-App-Id}}",
"commands": [
{
"id": "dynamicsearch",
"type": "action",
"title": "Dynamic Search",
"description": "Dynamic Search",
"initialRun": false,
"fetchTask": true,
"context": [
"compose"
]
}
]
}
],
- Add the following messaging extension invoke handler in TeamsBot
handleTeamsMessagingExtensionFetchTask(context, action) {
const userCard = CardFactory.adaptiveCard(this.adaptiveCardForDyanamicSearch());
return {
task: {
type: "continue",
value: {
card: userCard,
},
},
};
}
- In
onInvokeActivitymethod change last linereturn nullwithreturn super.onInvokeActivity(context); - Start up the bot service
Actual Behaviour
No invoke API call is being made with activity type application/search and shows the following result

Expected behaviour
An API call to invoke endpoint is made with activity type application/search and renders the list of options returned from onInvokeActivity handler
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 45
Hi, I hope this helps someone. I did following process and it worked:
Click three dots next to the channel name you want to use this app for. Choose “Manage team” . Choose “Apps” . Click “Upload an app” and upload an app .
@sayali-MSFT Hello - I don’t mean to hijack this ticket but I am also facing the same issue.
I’m displaying a type-ahead choice-set input in an adaptive card, via a task/fetch action from my message extension app. When text is entered into the field, it presents with Unable to show options right now as @shubham-betterworks describes above, and I can see no search request is reaching my app.
When I send the same card from my bot in conversation, entering text into the field does produce an incoming search request to my app, so the underlying issue seems to be related to the context of presenting the card as a ME task/fetch command vs. in a conversation with a bot. This behaviour is the same across web and desktop.
My app is intended to be purely a message extension, so not being able to use type-ahead in this context is a detriment. Perhaps this is alluded to in this frustratingly vague excerpt from the documentation: You can’t get rich card experiences with dynamic search, such as query-based message extensions.
It would be great if there is a solution forthcoming, but if type-ahead is definitively impossible from an ME task module (ie. not an issue that will be solved), it would be helpful to update the documentation to reflect this explicitly: type-ahead choice-set inputs simply do not work in ME task modules.
@sayali-MSFT, I cleared out the cache then logout and login again into Microsoft Teams in the chrome browser. Still the same behaviour
@sayali-MSFT Attaching the video recording as well showing the error in web app opened in chrome browser Recording was done at
16:37-16:38 IST web app in chrome. https://user-images.githubusercontent.com/80667102/200550841-4ded912c-c1f4-4b9a-8473-6e66fa372edd.mp4Another recording showing the functionality in a native app for MacOS Recording was done at
16:42-16:43 IST for Microsoft Teams Mac OS apphttps://user-images.githubusercontent.com/80667102/200551079-5b85249e-8409-4c7a-9d04-8fd876af9aec.mp4Stating the bot id once more
ba982efe-d324-480f-86b8-f961b9c3e521Let me know if I can provide something else to help you guys in debugging
@shubham-betterworks -We will inform the engineering team and We will update you.
@sayali-MSFT I tested this in the browser earlier when I raised the issue. After your comment, I tested it again today and it is working now. Seems like something was updated at MS Teams end.
Thanks for your help