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.
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:
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!