SOLVED

Add custom entry to MS Teams chat context menu without MS Teams bot

%3CLINGO-SUB%20id%3D%22lingo-sub-2707094%22%20slang%3D%22en-US%22%3EAdd%20custom%20entry%20to%20MS%20Teams%20chat%20context%20menu%20without%20MS%20Teams%20bot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2707094%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHi%20everyone%2C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3Ewe%20currently%20developing%20an%20MS%20Teams%20Tab%20App%20and%20we%20trying%20to%20find%20a%20way%20to%26nbsp%3Badd%20custom%20entry%20to%20the%20Microsoft%20Teams%20chat%20context%20menu%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2201.png%22%20style%3D%22width%3A%20339px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307280i8E8E974DC7C3E007%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2201.png%22%20alt%3D%2201.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CBR%20%2F%3Eor%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2202.png%22%20style%3D%22width%3A%20521px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307281i129AEAABB6D1C9CB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2202.png%22%20alt%3D%2202.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20far%20our%20investigation%20shows%20that%20we%20always%20have%20to%20use%20an%20MS%20Teams%20bot.%20In%20our%20scenario%20this%20is%20at%20the%20moment%20not%20an%20acceptable%20solution.%20Is%20there%20any%20other%20way%20to%20add%20a%20context%20menu%20entry%20in%20one%20of%20these%20menus%3F%3CBR%20%2F%3E%3CBR%20%2F%3EKind%20regards%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESebastian%20Dreier%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2707094%22%20slang%3D%22en-US%22%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-2707133%22%20slang%3D%22en-US%22%3ERe%3A%20Add%20custom%20entry%20to%20MS%20Teams%20chat%20context%20menu%20without%20MS%20Teams%20bot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2707133%22%20slang%3D%22en-US%22%3EYou%20are%20correct.%20Adding%20items%20to%20the%20context%20menu%20is%20done%20via%20a%20Teams%20Messaging%20Extension%20of%20the%20type%20%22action%20command%22.%20See%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fmessaging-extensions%2Fhow-to%2Faction-commands%2Fdefine-action-command%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fmessaging-extensions%2Fhow-to%2Faction-commands%2Fdefine-action-command%3C%2FA%3E%20for%20full%20documentation.%3CBR%20%2F%3E%3CBR%20%2F%3EMessaging%20Extensions%20in%20Microsoft%20Teams%20is%20built%20on%20top%20of%20the%20Bot%20Framework%20Invoke%20command%2C%20therefore%20you%20need%20to%20use%20a%20bot%20for%20this%20-%20however%2C%20you%20don't%20have%20a%20bot%20experience%20in%20your%20Teams%20app.%3C%2FLINGO-BODY%3E
New Contributor

Hi everyone,

we currently developing an MS Teams Tab App and we trying to find a way to add custom entry to the Microsoft Teams chat context menu:

01.png


or

 

02.png

So far our investigation shows that we always have to use an MS Teams bot. In our scenario this is at the moment not an acceptable solution. Is there any other way to add a context menu entry in one of these menus?

Kind regards

Sebastian Dreier

3 Replies
best response confirmed by sdreier2021 (New Contributor)
Solution
You are correct. Adding items to the context menu is done via a Teams Messaging Extension of the type "action command". See https://docs.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/how-to/action-commands... for full documentation.

Messaging Extensions in Microsoft Teams is built on top of the Bot Framework Invoke command, therefore you need to use a bot for this - however, you don't have a bot experience in your Teams app.
Adding custom entry to the Microsoft Teams chat context menu is supported through Teams Bot.
I don't think there is a direct way to add entry to chat context menu.

For anyone who finds this later, as I did, I've been using this method

 

Trigger flows from any message in Microsoft Teams | Power Automate Blog

 

It lets you trigger a flow from any message, as described, and you just create a Flow and an optional Adaptive Card to capture information to send to your chosen destination. I'm using it to send the contents of the message by email to the IT Helpdesk as a new ticket 'created by' the person who sent the message you run it on. Once you create the flow, the option appears on the message overflow menu as shown, without a bot and without having to do anything other than creating the flow itself. Hope this helps someone.