[Bug]: M365 copilot plugin is not reading adaptive card as a response from message extension
ShujaathKhan opened this issue · comments
Sample
msgext-multiparam-ts
Description
We've all the pre-requisites to do the copilot plugin development.
- Earlier we got started with sample solutions placed here which were working fine when tried as vanilla and as is.
- The same solution for plugin is now not working and though the valid adaptive card JSON is passed from code( which we could see from console log) from vs-code while the same works as message extension when tried separately outside the m365 copilot app.
- Besides, we've searched ppl are facing similar kinda issue which are raised in diff. forums as ex ref below
https://techcommunity.microsoft.com/t5/copilot-for-microsoft-365/copilot-m365-not-showing-results-from-message-extension-plugin/m-p/4120042?lightbox-message-images-4133309=578372i01B70989D420AE33
4.I also have a doubt in the function execution details of co-pilot plugin - Why 2 calls are being made to my plugin as 1 gets fails and second gets success. Also, from message extension this is not happening.
Steps to reproduce
- Run the same sample as selected above.
Expected results
M365 co-pilot should respond as expected from the plugin which is enabled by the user when proper prompt is triggered and respond as adaptive card for the stock price asked.
Actual results
Observations
Additional Info
Wanted why two attempts are being made as attached in screenshot
Hey @ShujaathKhan 👋
Response status 0 generally means that your plugin did not respond within the timeout window which is 10 seconds. See https://learn.microsoft.com/microsoft-365-copilot/extensibility/debugging-copilot-plugin for more information.
If the plugin response is returned within 10 seconds, then I would suggest raising a support ticket via the Microsoft 365 admin portal (if you have a support arrangement) or raising a new question of Microsoft Q&A to get further support. See https://learn.microsoft.com/microsoft-365-copilot/extensibility/feedback for more information.
Hey @ShujaathKhan ,
I faced this issue and was able to resolve it, though I am still investigating the root cause. It appears to be related to the adaptive card and its creation in the backend.
To resolve it, you can generate a sample message extension bot project using the Teams Toolkit. Then, copy the adaptive card TypeScript(or JavaScript, if your project is in JavaScript ) code from the sample project and paste it into your solution. Keep the outer adaptive card code the same, and make the necessary changes. This approach should work, as the sample project code will always work.