Microsoft Teams Message extension without popup/extra parameters and submit action

%3CLINGO-SUB%20id%3D%22lingo-sub-2505464%22%20slang%3D%22en-US%22%3EMicrosoft%20Teams%20Message%20extension%20without%20popup%2Fextra%20parameters%20and%20submit%20action%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2505464%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22votecell%20post-layout--left%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22postcell%20post-layout--right%22%3E%3CDIV%20class%3D%22s-prose%20js-post-body%22%3E%3CP%3EI%20want%20to%20have%20a%20message%20extension%2C%20action%20based%20command%20that%20simply%20sends%20the%20message%20text%20to%20the%20message%20handler.%20So%20when%20the%20user%20clicks%20the%20message%20extension%20from%20the%20(...)%20context%20menu%2C%20that%20is%20it%2C%20no%20other%20input%2Fstep%20is%20necessary.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EIt%20appears%20that%20Microsoft%20forces%20you%20to%20have%20some%20additional%20parameters.%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20get%20around%20this%20and%20simply%20send%20the%20message%20content%20without%20additional%20parameters%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20to%26nbsp%3B%3CSPAN%3Esetting%26nbsp%3B%3C%2FSPAN%3EfetchTask%3CSPAN%3E%26nbsp%3Bto%20false%20and%20removing%20the%26nbsp%3Bparameter%26nbsp%3Bvalues%2C%20but%20that%20doesn't%26nbsp%3B%20work.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20any%20solution%20available%26nbsp%3Bto%20achieve%20this%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CSPAN%20class%3D%22hljs-string%22%3E%22composeExtensions%22%3C%2FSPAN%3E%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22botId%22%3C%2FSPAN%3E%3A%20%3CSPAN%20class%3D%22hljs-string%22%3E%22--Bot%20Id%20Here--%22%2C%3C%2FSPAN%3E%0A%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22commands%22%3C%2FSPAN%3E%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22id%22%3C%2FSPAN%3E%3A%20%3CSPAN%20class%3D%22hljs-string%22%3E%22commandId%22%3C%2FSPAN%3E%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22type%22%3C%2FSPAN%3E%3A%20%3CSPAN%20class%3D%22hljs-string%22%3E%22action%22%3C%2FSPAN%3E%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22title%22%3C%2FSPAN%3E%3A%20%3CSPAN%20class%3D%22hljs-string%22%3E%22Command%20Title%22%3C%2FSPAN%3E%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22description%22%3C%2FSPAN%3E%3A%20%3CSPAN%20class%3D%22hljs-string%22%3E%22%22%3C%2FSPAN%3E%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22initialRun%22%3C%2FSPAN%3E%3A%20%3CSPAN%20class%3D%22hljs-literal%22%3Etrue%3C%2FSPAN%3E%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22fetchTask%22%3C%2FSPAN%3E%3A%20%3CSPAN%20class%3D%22hljs-literal%22%3Efalse%3C%2FSPAN%3E%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22context%22%3C%2FSPAN%3E%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22hljs-string%22%3E%22message%22%3C%2FSPAN%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%5D%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3BI%20want%20to%20publish%20it%20on%20store%2C%20so%20it%20must%20pass%20the%20the%20manifest%20validation%20test.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2505464%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2508284%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20Message%20extension%20without%20popup%2Fextra%20parameters%20and%20submit%20action%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2508284%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F932817%22%20target%3D%22_blank%22%3E%40Hiral_Patel%3C%2FA%3E%26nbsp%3B-%20Is%20your%20request%20hitting%20bot's%20code%20when%20user%20clicks%20on%20Messaging%20Extension%20action%20for%20any%20message%3F%26nbsp%3BWhen%20I%20tried%20creating%20command%20with%20same%20values%20as%20mentioned%20in%20the%20post%2C%20I%20was%20able%20to%20get%20it%20working.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22WajeedMSFT_1-1625161838584.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F292988iB93EEFB59D358BFA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22WajeedMSFT_1-1625161838584.png%22%20alt%3D%22WajeedMSFT_1-1625161838584.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22WajeedMSFT_2-1625161957606.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F292990iBFE46312A7E04393%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22WajeedMSFT_2-1625161957606.png%22%20alt%3D%22WajeedMSFT_2-1625161957606.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20see%20the%20warning%20in%20App%20Validation%20for%20this%20which%20I'll%20check%20with%20team.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22WajeedMSFT_0-1625161675546.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F292987i23877B1E0565BE09%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22WajeedMSFT_0-1625161675546.png%22%20alt%3D%22WajeedMSFT_0-1625161675546.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor
 

I want to have a message extension, action based command that simply sends the message text to the message handler. So when the user clicks the message extension from the (...) context menu, that is it, no other input/step is necessary.


It appears that Microsoft forces you to have some additional parameters.

Is there a way to get around this and simply send the message content without additional parameters?

 

I tried to setting fetchTask to false and removing the parameter values, but that doesn't  work.

Is there any solution available to achieve this?

 

"composeExtensions": [
    {
        "botId": "--Bot Id Here--",
        "commands": [
            {
                "id": "commandId",
                "type": "action",
                "title": "Command Title",
                "description": "",
                "initialRun": true,
                "fetchTask": false,
                "context": [
                    "message"
                ]
            }
        ]
    }
]

 

 I want to publish it on store, so it must pass the the manifest validation test.

1 Reply

@Hiral_Patel - Is your request hitting bot's code when user clicks on Messaging Extension action for any message? When I tried creating command with same values as mentioned in the post, I was able to get it working.

WajeedMSFT_1-1625161838584.png

WajeedMSFT_2-1625161957606.png

 

I see the warning in App Validation for this which I'll check with team. 

WajeedMSFT_0-1625161675546.png

 

www.000webhost.com