How to: use a hyperlink to jump directly to a Teams private chat with a user
It’s a fairly common request, from another application, you want to be able to click a button and start a chat with a specific person. Perhaps you want to provide useful contact links to the account manager in your Sales application or integrate your HR intranet to make it easy for people to contact each other.
In Skype for Business, the way to do this was to use a sip address in an anchor link – something like <a href=”sip:[email protected]”>User</a>. This would open the chat window, from which you could either type an IM or start a call.
It turns out there is a way to do this in Teams. Thanks to Jayesh Gandhi in the Microsoft Tech Community for finding this out, I was not aware of it.
You can construct an anchor tag to jump directly to a Teams chat with a user: <a href=”https://teams.microsoft.com/l/chat/0/[email protected]”>Chat with User</a>.
You can even add multiple people to start a group conversation by separating the users with a comma: <a href=”https://teams.microsoft.com/l/chat/0/[email protected],[email protected]”>Chat with Group</a>.
Even cooler (when adding links in other applications) you can pre-select the message to be sent and the title of the group conversation. The message is added to the conversation input box ready to be sent:
<a href=”https://teams.microsoft.com/l/chat/0/[email protected],[email protected]&topicName=About these widgets&message=Please order more widgets”>Order more</a>
Example:
These are great features for developers looking to add basic Teams messaging functionality into existing applications. Thanks again to Jayesh for bringing this to my attention!
Thanks Tom for sharing this , its working !!!
Hi ,
can we add a url in message
like wise
var link = ‘‘ + google+ ‘‘;
var url = ‘msteams:/l/chat/0/0?users=’ + email + ‘&message=Hi ‘ + firstName + ‘, this is regarding ticket: ‘ + link + ‘ – ‘ + short_desc;
Hi,
can we add a url in message like below
var link = var incURL = ‘‘ + number + ‘‘;
var url = ‘msteams:/l/chat/0/0?users=’ + email + ‘&message=Hi ‘ + firstName + ‘, this is regarding ticket: ‘ + link + ‘ – ‘ + short_desc;
Can you please help me creating a link to a team channel with some content in it.
really cool, working fine! thanks
is it possible to have the message sent?
Hi,
Thanks for this article. It is helpful.
Is it possible to open chat in an already created Teams Chat group rather than specific user?