How to Manage Microsoft Teams & Send Messages using the Teams API in Microsoft Graph

%3CLINGO-SUB%20id%3D%22lingo-sub-87966%22%20slang%3D%22en-US%22%3EHow%20to%20Manage%20Microsoft%20Teams%20%26amp%3B%20Send%20Messages%20using%20the%20Teams%20API%20in%20Microsoft%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87966%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20not%20sure%20how%20well%20known%20this%20is%2C%20but%20there%20is%20support%20in%20Microsoft%20Graph%20for%20creating%20and%20managing%20Channels%20and%20sending%20messages%20to%20Channels.%20It's%20still%20in%20Beta%20and%20I'm%20sure%20that%20there%20are%20lots%20of%20great%20improvements%20planned%20still%2C%20but%20there%20might%20be%20enough%20there%20today%20to%20enable%20you%20to%20do%20what%20you%20want.%3CBR%20%2F%3E%3CBR%20%2F%3EFull%20walk%20through%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fblog.thoughtstuff.co.uk%2F2017%2F07%2Fhow-to-manage-microsoft-teams-send-messages-using-the-teams-api-in-microsoft-graph%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblog.thoughtstuff.co.uk%2F2017%2F07%2Fhow-to-manage-microsoft-teams-send-messages-using-the-teams-api-in-microsoft-graph%2F%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3E%3CBR%20%2F%3E-tom%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-87966%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-363731%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Manage%20Microsoft%20Teams%20%26amp%3B%20Send%20Messages%20using%20the%20Teams%20API%20in%20Microsoft%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-363731%22%20slang%3D%22en-US%22%3E%3CP%3EMy%20colleague%20helped%20me%20find%20it%2C%20who%20in-turn%20figured%20it%20out%20using%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fdeep-links%23generating-a-deep-link-to-a-chat%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fdeep-links%23generating-a-deep-link-to-a-chat%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-363245%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Manage%20Microsoft%20Teams%20%26amp%3B%20Send%20Messages%20using%20the%20Teams%20API%20in%20Microsoft%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-363245%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F7960%22%20target%3D%22_blank%22%3E%40Tom%20Morgan%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3EThat's%20awesome%2C%20I%20didn't%20know%20about%20that.%26nbsp%3B%20How%20did%20you%20find%20that%2C%20is%20it%20documented%3F%20Or%20you%20just%20discovered%20it%20worked%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-tom%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EGood%20question%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F7960%22%20target%3D%22_blank%22%3E%40Tom%20Morgan%3C%2FA%3E%26nbsp%3B.%20I'd%20be%20a%20bit%20wary%20of%20using%20something%20that%20isn't%20officially%20documented%20-%20no%20guarantee%20it%20will%20work%20in%20the%20future.%3C%2FP%3E%3CP%3EWhat%20I%20need%20to%20do%20is%20post%20a%20chat%20message%20to%20someone%20via%20an%20API.%20Was%20googling%20for%20the%20answer%20and%20ended%20up%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-354635%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Manage%20Microsoft%20Teams%20%26amp%3B%20Send%20Messages%20using%20the%20Teams%20API%20in%20Microsoft%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-354635%22%20slang%3D%22en-US%22%3E%3CP%3EThat's%20awesome%2C%20I%20didn't%20know%20about%20that.%26nbsp%3B%20How%20did%20you%20find%20that%2C%20is%20it%20documented%3F%20Or%20you%20just%20discovered%20it%20worked%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E-tom%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-354630%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Manage%20Microsoft%20Teams%20%26amp%3B%20Send%20Messages%20using%20the%20Teams%20API%20in%20Microsoft%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-354630%22%20slang%3D%22en-US%22%3E%3CP%3ENever%20mind%3CEM%3E%2C%26nbsp%3B%3C%2FEM%3EFound%20the%20answer%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20can%20use%20this%20as%20hyperlink%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2Fl%2Fchat%2F0%2F0%3Fusers%3D%26lt%3BemailidoftheusertoIM%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fl%2Fchat%2F0%2F0%3Fusers%3D%3CEMAILIDOFTHEUSERTOIM%3E%3C%2FEMAILIDOFTHEUSERTOIM%3E%3C%2FA%3E%26gt%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-354592%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Manage%20Microsoft%20Teams%20%26amp%3B%20Send%20Messages%20using%20the%20Teams%20API%20in%20Microsoft%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-354592%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20requirement%20to%20IM%20a%20person%20from%20intranet.%20We%20thought%20of%20using%20MS%20Teams%2C%20instead%20of%20Skype.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20could%20not%20find%20any%20api%2Fclient%20code%20to%20open%20MS%20teams%20to%20message%20particular%20person%20using%20code.%20Any%20idea%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EJayesh%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1505239%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Manage%20Microsoft%20Teams%20%26amp%3B%20Send%20Messages%20using%20the%20Teams%20API%20in%20Microsoft%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1505239%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20great%20however%20I%20find%20that%20when%20I%20add%20this%20deep-link%2C%20it%20opens%20my%20default%20browser%20(Edge)%20and%20then%20prompts%20to%20open%20the%20Teams%20app.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20to%20stop%20this%20happening%20does%20anybody%20know%20please%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EI%20would%20like%20to%20use%20this%20in%20emails%20to%20drive%20people%20to%20chat%20rather%20than%20having%20an%20email%20conversation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDavid%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
MVP

I'm not sure how well known this is, but there is support in Microsoft Graph for creating and managing Channels and sending messages to Channels. It's still in Beta and I'm sure that there are lots of great improvements planned still, but there might be enough there today to enable you to do what you want.

Full walk through here: https://blog.thoughtstuff.co.uk/2017/07/how-to-manage-microsoft-teams-send-messages-using-the-teams-...

Thanks,

-tom

6 Replies
Highlighted

Hi,

 

We have a requirement to IM a person from intranet. We thought of using MS Teams, instead of Skype.

 

However, could not find any api/client code to open MS teams to message particular person using code. Any idea?

 

Regards,

Jayesh

Highlighted
Highlighted

That's awesome, I didn't know about that.  How did you find that, is it documented? Or you just discovered it worked?

 

-tom

Highlighted

@Tom Morgan wrote:

That's awesome, I didn't know about that.  How did you find that, is it documented? Or you just discovered it worked?

 

-tom


Good question @Tom Morgan . I'd be a bit wary of using something that isn't officially documented - no guarantee it will work in the future.

What I need to do is post a chat message to someone via an API. Was googling for the answer and ended up here.

Highlighted
Highlighted

This is great however I find that when I add this deep-link, it opens my default browser (Edge) and then prompts to open the Teams app.

 

Is there any way to stop this happening does anybody know please?

I would like to use this in emails to drive people to chat rather than having an email conversation.

 

Thanks

 

David