SOLVED

How to Send a Message(Card) to specific User from External WebApp

%3CLINGO-SUB%20id%3D%22lingo-sub-320709%22%20slang%3D%22en-US%22%3EHow%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320709%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewe%20have%20an%20external%20ASP.NET%204.7%20App%20(in%20Azure%20App%20Service)%2C%20which%26nbsp%3Bshould%20send%20Messages%2FCards%20to%20one%20specific%20User%20in%20Teams.%3C%2FP%3E%3CP%3EI%20managed%20to%20send%20Cards%20to%20Channels%20via%20the%20Connector%2FWebHook%2C%20but%20cannot%20target%20an%20specific%20User.%3C%2FP%3E%3CP%3EHow%20can%20i%20do%20this%20%2F%20which%20Services%20are%20needed%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(pleas%20as%20simple%20as%20possible%20%3A)%3C%2Fimg%3E%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20You%3C%2FP%3E%3CP%3EChristoph%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-320709%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-323540%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-323540%22%20slang%3D%22en-US%22%3E%3CP%3EI%20think%20you%20can%20use%20this%20blog%20as%20a%20starting%20point%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fblog.somecreativity.com%2F2016%2F11%2F04%2Fsend-a-notification-to-a-microsoft-teams-user-from-an-app%2F%26nbsp%3B%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblog.somecreativity.com%2F2016%2F11%2F04%2Fsend-a-notification-to-a-microsoft-teams-user-from-an-app%2F%26nbsp%3B%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20only%20challenge%20I%20think%20you%20will%20have%2C%20is%20that%20you%20will%20need%20a%201%3A1%20conversation%20or%20a%20conversation%20from%20a%20team%2Fchannel%20with%20your%20bot%20first%20from%20the%20user%20who%20will%20need%20to%20be%20notified.%26nbsp%3BThis%20because%20you%20will%20need%20a%20starting%20chat%20reference%20as%20stated%20in%20the%20notification%20only%20bot%20documentation%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20class%3D%22%22%3EThere%20is%20no%20way%20currently%20to%20create%20a%3CCODE%3Epersonal%3C%2FCODE%3E%20scoped%20notification%20only%20bot%20since%20the%20user%20cannot%20message%20your%20notification%20only%20bot%20in%20a%20personal%20chat.%20This%20means%20that%20you%20can't%20receive%20a%20%3CCODE%3EconversationUpdate%3C%2FCODE%3E%20event%20that%20would%20provide%20you%20with%20the%20necessary%20details%20to%20send%20a%20notification.%20Your%20notification%20only%20bot%20will%20only%20function%20correctly%20if%20it%20supports%20the%20%3CCODE%3Eteam%3C%2FCODE%3E%20scope%20and%20is%20added%20to%20a%20team.%20In%20the%20team%20setting%2C%20your%20bot%20will%20have%20access%20to%20the%20necessary%20information%20to%20either%20send%20a%20notification%20to%20a%20channel%20or%20privately%20to%20a%20user.%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-323511%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-323511%22%20slang%3D%22en-US%22%3EThank%20youm%20but%20i%20didnt%20find%20a%20sample%20for%20a%20bot%2C%20which%20is%20triggered%20from%20an%20external%20(http)%20request%20and%20then%20sends%20a%20message%20to%20the%20user%20%3A(%3C%2Fimg%3E%3CBR%20%2F%3EDo%20you%20have%20any%20of%20this%20for%20me%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-323508%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-323508%22%20slang%3D%22en-US%22%3E%3CP%3EI%20got%20some%20answers%20back%20and%20at%20the%20moment%20the%20only%20option%20is%20to%20use%20a%20bot%20for%20this.%20And%20more%20specifically%20a%20notifications%20only%20bot%2C%20as%20I%20mentioned%20before.%20I%20don't%20think%20it%20would%20be%20that%20a%20big%20of%20an%20effort%20to%20develop%20such%20a%20bot.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320805%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320805%22%20slang%3D%22en-US%22%3EWe%20have%20an%20ASP.NET%20Application%2C%20where%20we%20manage%20Entities%2FObjects.%3CBR%20%2F%3E%3CBR%20%2F%3EWhenever%20e.g.%20an%20Ownership%20is%20changing%20from%20one%20coworker%20to%20anotherm%20the%20new%20owner%20should%20get%20an%20notification%20(preferred%20in%20Teams)%20that%20he%20can%20handle%20the%20work%20asap.%3CBR%20%2F%3E%3CBR%20%2F%3EWe%20currently%20do%20this%20with%20Slack%20messages%20to%20the%20responsible%20worker%2C%20but%20(due%20to%20GDPR)%20want(ed)%20to%20switch%20to%20Teams.%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20we%20are%20very%20busy%20enhancing%20and%20extending%20out%20WebApp%20we%20dont%20want%20so%20spend%20to%20much%20effort%20in%20building%20a%20Bot.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320799%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320799%22%20slang%3D%22en-US%22%3E%3CP%3EChristoph%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWould%20you%20mind%20to%20describe%20your%20scenario%20you%20have%20in%20mind%20in%20more%20detail%3F%20I%20would%20like%20to%20address%20this%20scenario%20to%20Microsoft%2C%20in%20order%20to%20look%20if%20there%20are%20other%20possibilities.%20We%20want%20you%20to%20use%20Teams!%20%3A)%3C%2Fimg%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETnx%20in%20advance!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320794%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320794%22%20slang%3D%22en-US%22%3Ei%20didn't%20want%20to%20use%20the%20Bot%20Framework%2C%20as%20i%20prefer%20simple%20solutions%20(like%20the%20connectors%2Fwebhooks).%3CBR%20%2F%3EBut%20if%20this%20is%20the%20only%20way%20(as%20the%20Graph%20API%20does%20not%20support%20direct%20messages)%20i%20will%20have%20to%20think%20about%20staying%20at%20slack%20%3A(%3C%2Fimg%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320790%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320790%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20I've%20understood%20you%20should%20create%20a%20bot%2C%20using%20the%20Bot%20Framework%2C%20in%20your%20Application.%20You%20should%20add%20this%20app%20to%20Teams%20using%20an%20App%20manifest.%20The%20bot%20should%20be%20a%20Notification%20only%20bot%20as%20described%20here%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fbots%2Fbots-notification-only%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fbots%2Fbots-notification-only%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20you%20already%20added%20your%20application%20as%20an%20App%20to%20Microsoft%20Teams%3F%20This%20way%20it%20should%20be%20able%20to%20start%20a%20proactive%20conversation%20with%20a%20user%20from%20your%20bot%2C%20once%20your%20app%20is%20added%20to%20a%20team%20or%20when%20installed%20by%20user%20(personal%20app).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320784%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320784%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3Esounds%20good%2C%20but%20i%20cannot%20add%20an%20activity%20from%20an%20Application%2C%20as%20i%20have%20to%20have%20an%20authenticated%20User.%3CBR%20%2F%3EAnd%20in%20addition%20to%20this%20i%20can%20create%20an%20activity%2C%20but%20it's%20not%20shown%20in%20the%20Teams%20Acitivity%20feed%20%3A(%3C%2Fimg%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320772%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320772%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Christoph%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20could%20use%20the%20Activity%20feed%20API%20in%20Microsoft%20Graph%20in%20order%20to%20send%20a%20message%2Fcard%20to%20a%20specific%20user.%20More%20info%20can%20be%20found%20here%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Factivity-feed%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Factivity-feed%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%22%3CSPAN%3EAdditionally%2C%20you%20can%20also%20send%20personal%20chat%20messages%20into%20the%20feed%20as%20preview%20cards%20summarizing%20your%20app's%20activity.%22%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1060963%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1060963%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F18690%22%20target%3D%22_blank%22%3E%40Robert%20Schouten%3C%2FA%3E%26nbsp%3BTwo%20years%20ago%20I%20implemented%20Slack%20notifications%20with%20a%20binary%20file%20attachment%20in%20less%20than%202%20hours.%26nbsp%3B%20I%20have%20been%20trying%20to%20figure%20out%20the%20same%20with%20Teams%20for%20the%20last%20week%20and%20finally%20after%20getting%20my%20service%20to%20authenticate%20as%20an%20application%20against%20Teams%20I%20have%20learned%20I%20can%20not%20send%20a%20general%20notification%20message%20to%20a%20channel.%26nbsp%3B%20I%20think%20I%20am%20missing%20something%20because%2C%20at%20least%20with%20Slack%2C%20this%20is%20a%20very%20common%20use%20case.%26nbsp%3B%20An%20example%20scenario%20is%20sending%20IT%20a%20notification%20message%20when%20a%20server%20is%20down.%26nbsp%3B%20This%20has%20nothing%20to%20do%20with%20Chat%20Bots%20and%20Users%20but%20instead%20provides%20a%20portal%20into%20reviewing%20important%20events%20which%20a%20group%20of%20users%20want%20to%20view.%26nbsp%3B%20Is%20this%20really%20a%20limitation%20of%20Teams%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1061655%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1061655%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F485760%22%20target%3D%22_blank%22%3E%40mjanulaitis%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20we%20do%20this%20is%20a%20round%20about%20way.%20We%20use%20Flow%20(PowerAutomate)%20and%20watch%20a%20message%20queue%20(usually%20an%20e-mail%20inbox)%20..%20parse%20off%20the%20subject%20and%20the%20body%20and%20using%20the%20Teams%20connector%20push%20a%20message%20into%20a%20specific%20team%2Fchannel.%20I%20think%20there%20is%20now%20a%20way%20to%20send%20a%20message%20to%20a%20specific%20user%20in%20Teams.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%20any%20number%20of%20actions%20that%20use%20the%20Teams%20FlowBot%20to%20post%20messages%20to%20user.%20or%20you%20can%20just%20post%20to%20a%20channel.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1707909%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1707909%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F18690%22%20target%3D%22_blank%22%3E%40Robert%20Schouten%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20i%20ask%20if%20there%20is%20any%20other%20way%20to%20do%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20mean%20to%20populate%20user%20feed%20with%20notifications%20not%20usings%20and%20channels%20or%20teams%20just%20to%20notify%20him%20from%20external%20app%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1708986%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1708986%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F807319%22%20target%3D%22_blank%22%3E%40damien910%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20way%20to%20get%20something%20into%20the%20Activity%20feed%20in%20Teams%20is%20to%20post%20a%20message%20of%20some%20sort%3B%20either%20directly%20to%20the%20user%2C%20using%20a%20%22%40tag%22%2C%20or%20posting%20into%20a%20channel%20that%20the%20user%20has%20notifications%20turned%20on%20for.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EHowever%20..%20MS%20has%20a%20bunch%20of%20other%20products%20that%20you%20can%20send%20messages%20to%20a%20user%20in%3A%3C%2FP%3E%3CUL%3E%3CLI%3Eyou%20could%20just%20send%20them%20an%20e-mail%3C%2FLI%3E%3CLI%3EYou%20can%20now%20assign%20a%20Task%20to%20them%20via%20Tasks%2FToDo%3C%2FLI%3E%3CLI%3EYou%20could%20set%20up%20personal%20lists%20for%20everyone%20and%20add%20an%20item%20to%20a%20list%3C%2FLI%3E%3CLI%3EIf%20it's%20project-related%2C%20you%20can%20set%20up%20a%20Planner%20and%20assign%20a%20task%20there%3C%2FLI%3E%3CLI%3Eyou%20can%20schedule%20an%20event%20in%20their%20calendar%3C%2FLI%3E%3CLI%3Eor%20if%20they%20are%20running%20the%20mobile%20Flow%20app%20you%20can%20send%20a%20notification%20(I%20think)%3C%2FLI%3E%3C%2FUL%3E%3CP%3EIf%20anything%20there%20are%20almost%20too%20many%20ways%20to%20get%20a%20message%20to%20a%20user.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1709976%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1709976%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F484537%22%20target%3D%22_blank%22%3E%40CYappert%3C%2FA%3E%26nbsp%3Bok%20so%20if%20i%20want%20to%20use%20this%26nbsp%3B%40mention%20how%20can%20i%20call%20it%20from%20API%20i%20mean%20how%20to%20emmbed%20it%20in%20to%20JSON%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1710067%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Send%20a%20Message(Card)%20to%20specific%20User%20from%20External%20WebApp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1710067%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F807319%22%20target%3D%22_blank%22%3E%40damien910%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20the%20implication%20of%20my%20answer%20is%20that%20you%20are%20using%20PowerAutomate%20as%20your%20execution%20mechanism%20and%20taking%20advantage%20of%20all%20of%20the%20connectors%20and%20actions%20that%20PowerAutomate%20has.%3CBR%20%2F%3E%3CBR%20%2F%3EThere%20is%20a%20connector%20%3CSTRONG%3EHTTP%20Request%2C%26nbsp%3B%3C%2FSTRONG%3Ethat%20exposes%20a%20REST%20endpoint%20that%20you%20can%20post%20a%20JSON%20file%20to.%20I%20can't%20speak%20to%20the%20format%20of%20the%20JSON%20file.%20From%20there%20the%20PowerAutomate%20flow%20could%20pick%20off%20values%20in%20the%20JSON%20file%20and%20use%20it%20to%20post%20a%20message%2Faction%20to%20a%20user%20in%20Teams%20using%20the%20Teams%20Connector.%3CBR%20%2F%3E%3CBR%20%2F%3ESince%20I%20don't%20know%20what%20the%20external%20app%20is%20I%20have%20no%20idea%20how%20it%20authenticates%20nor%20can%20I%20speak%20to%20what%20security%20you%20would%20want%2Fneed%20to%20put%20on%20the%20REST%20endpoint%20to%20make%20sure%20that%20the%20endpoint%20isn't%20abused.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20that%20this%20sounds%20like%20I'm%20dodging%20the%20issue%20...%20but%20there%20is%20no%20precanned%20solution%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

 

we have an external ASP.NET 4.7 App (in Azure App Service), which should send Messages/Cards to one specific User in Teams.

I managed to send Cards to Channels via the Connector/WebHook, but cannot target an specific User.

How can i do this / which Services are needed?

 

(pleas as simple as possible :) )

 

thank You

Christoph

15 Replies

Hi Christoph,

 

You could use the Activity feed API in Microsoft Graph in order to send a message/card to a specific user. More info can be found here:

 

https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/activity-feed

 

"Additionally, you can also send personal chat messages into the feed as preview cards summarizing your app's activity."

Hi,
sounds good, but i cannot add an activity from an Application, as i have to have an authenticated User.
And in addition to this i can create an activity, but it's not shown in the Teams Acitivity feed :(

As I've understood you should create a bot, using the Bot Framework, in your Application. You should add this app to Teams using an App manifest. The bot should be a Notification only bot as described here:

 

https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bots-notification-only

 

Have you already added your application as an App to Microsoft Teams? This way it should be able to start a proactive conversation with a user from your bot, once your app is added to a team or when installed by user (personal app).

i didn't want to use the Bot Framework, as i prefer simple solutions (like the connectors/webhooks).
But if this is the only way (as the Graph API does not support direct messages) i will have to think about staying at slack :(

Christoph,

 

Would you mind to describe your scenario you have in mind in more detail? I would like to address this scenario to Microsoft, in order to look if there are other possibilities. We want you to use Teams! :)

 

Tnx in advance! 

We have an ASP.NET Application, where we manage Entities/Objects.

Whenever e.g. an Ownership is changing from one coworker to anotherm the new owner should get an notification (preferred in Teams) that he can handle the work asap.

We currently do this with Slack messages to the responsible worker, but (due to GDPR) want(ed) to switch to Teams.

As we are very busy enhancing and extending out WebApp we dont want so spend to much effort in building a Bot.

I got some answers back and at the moment the only option is to use a bot for this. And more specifically a notifications only bot, as I mentioned before. I don't think it would be that a big of an effort to develop such a bot.

Thank youm but i didnt find a sample for a bot, which is triggered from an external (http) request and then sends a message to the user :(
Do you have any of this for me?

I think you can use this blog as a starting point:

 

https://blog.somecreativity.com/2016/11/04/send-a-notification-to-a-microsoft-teams-user-from-an-app...

 

The only challenge I think you will have, is that you will need a 1:1 conversation or a conversation from a team/channel with your bot first from the user who will need to be notified. This because you will need a starting chat reference as stated in the notification only bot documentation:

 

  • There is no way currently to create a personal scoped notification only bot since the user cannot message your notification only bot in a personal chat. This means that you can't receive a conversationUpdate event that would provide you with the necessary details to send a notification. Your notification only bot will only function correctly if it supports the team scope and is added to a team. In the team setting, your bot will have access to the necessary information to either send a notification to a channel or privately to a user.

@Robert Schouten Two years ago I implemented Slack notifications with a binary file attachment in less than 2 hours.  I have been trying to figure out the same with Teams for the last week and finally after getting my service to authenticate as an application against Teams I have learned I can not send a general notification message to a channel.  I think I am missing something because, at least with Slack, this is a very common use case.  An example scenario is sending IT a notification message when a server is down.  This has nothing to do with Chat Bots and Users but instead provides a portal into reviewing important events which a group of users want to view.  Is this really a limitation of Teams?

@mjanulaitis 

 

So we do this is a round about way. We use Flow (PowerAutomate) and watch a message queue (usually an e-mail inbox) .. parse off the subject and the body and using the Teams connector push a message into a specific team/channel. I think there is now a way to send a message to a specific user in Teams.

 

There are any number of actions that use the Teams FlowBot to post messages to user. or you can just post to a channel.

@Robert Schouten 

 

Hello 

 

Can i ask if there is any other way to do it?

 

I mean to populate user feed with notifications not usings and channels or teams just to notify him from external app

Best Response confirmed by ThereseSolimeno (Microsoft)
Solution

@damien910 

 

The only way to get something into the Activity feed in Teams is to post a message of some sort; either directly to the user, using a "@tag", or posting into a channel that the user has notifications turned on for.


However .. MS has a bunch of other products that you can send messages to a user in:

  • you could just send them an e-mail
  • You can now assign a Task to them via Tasks/ToDo
  • You could set up personal lists for everyone and add an item to a list
  • If it's project-related, you can set up a Planner and assign a task there
  • you can schedule an event in their calendar
  • or if they are running the mobile Flow app you can send a notification (I think)

If anything there are almost too many ways to get a message to a user.

@CYappert ok so if i want to use this @mention how can i call it from API i mean how to emmbed it in to JSON

@damien910 

 

So the implication of my answer is that you are using PowerAutomate as your execution mechanism and taking advantage of all of the connectors and actions that PowerAutomate has.

There is a connector HTTP Request, that exposes a REST endpoint that you can post a JSON file to. I can't speak to the format of the JSON file. From there the PowerAutomate flow could pick off values in the JSON file and use it to post a message/action to a user in Teams using the Teams Connector.

Since I don't know what the external app is I have no idea how it authenticates nor can I speak to what security you would want/need to put on the REST endpoint to make sure that the endpoint isn't abused.

 

I know that this sounds like I'm dodging the issue ... but there is no precanned solution here.