How to get the specific userId for communication between a bot and a particular user

%3CLINGO-SUB%20id%3D%22lingo-sub-2583043%22%20slang%3D%22en-US%22%3EHow%20to%20get%20the%20specific%20userId%20for%20communication%20between%20a%20bot%20and%20a%20particular%20user%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2583043%22%20slang%3D%22en-US%22%3E%3CP%3EA%20microsoft%20teams%20bot%20uses%20a%20specific%20user%20id%20for%20communication%20between%20bot%20and%20a%20user.%20This%20ID%20is%20unique%20for%20communication%20between%20these%20two.%20I%20am%20trying%20to%20get%20this%20ID%20for%20proactive%20messaging.%20I%20have%20seen%20many%20samples%20where%20we%20get%20this%20ID%20from%20a%20particular%20team%20channel%20or%20between%20a%20group%20chat.%20But%2C%20the%20problem%20is%20i%20want%20to%20get%20the%20userID%20of%20a%20user%20who%20is%20not%20a%20part%20of%20this%20chat.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%20-%3A%20If%20an%20employee%20submits%20a%20request%20using%20bot%20then%20his%20manager%20should%20be%20notified%20about%20that%20request%20proactively%20by%20the%20bot.%20How%20can%20i%20achieve%20that%20using%20the%20Application%20scope.%3C%2FP%3E%3CP%3EThe%20bot%20is%20installed%20for%20bot%20employee%20and%20manager.%3C%2FP%3E%3CP%3EI%20couldn't%20find%20any%20example%20where%20i%20can%20send%20a%20message%20from%20bot%20to%20user%20of%20AD%20or%20any%20teams%20user%20for%20that%20matter%20even%20if%20the%20bot%20is%20installed%20for%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2583043%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBots%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2584696%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20specific%20userId%20for%20communication%20between%20a%20bot%20and%20a%20particular%20user%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2584696%22%20slang%3D%22en-US%22%3EIs%20this%20what%20you%20are%20looking%20for%3F%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fuser-get%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fuser-get%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%3C%2FA%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

A microsoft teams bot uses a specific user id for communication between bot and a user. This ID is unique for communication between these two. I am trying to get this ID for proactive messaging. I have seen many samples where we get this ID from a particular team channel or between a group chat. But, the problem is i want to get the userID of a user who is not a part of this chat.

 

Example -: If an employee submits a request using bot then his manager should be notified about that request proactively by the bot. How can i achieve that using the Application scope.

The bot is installed for bot employee and manager.

I couldn't find any example where i can send a message from bot to user of AD or any teams user for that matter even if the bot is installed for them.

 

1 Reply