Link/deeplink to a new chat with default message

%3CLINGO-SUB%20id%3D%22lingo-sub-1249237%22%20slang%3D%22en-US%22%3ELink%2Fdeeplink%20to%20a%20new%20chat%20with%20default%20message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1249237%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there!%3C%2FP%3E%3CP%3ECan%20you%20help%20me%20with%20the%20link%26nbsp%3Bto%20a%20new%20chat%20with%20default%20message%3F%3C%2FP%3E%3CP%3EI%20have%20found%20this%20example%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fl%2Fchat%2F0%2F0%3Fusers%3D%3CUSER1%3E%2C%3CUSER2%3E%2C...%26amp%3BtopicName%3D%3CCHAT%20name%3D%22%22%3E%26amp%3Bmessage%3D%3CPRECANNED%20text%3D%22%22%3E%3C%2FPRECANNED%3E%3C%2FCHAT%3E%3C%2FUSER2%3E%3C%2FUSER1%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Ebut%20I%20haven't%20users%20ids%20to%20the%20moment%20I%20need%20to%20send%20message.Actually%20I%20need%20to%20provide%20some%20kind%20of%20%22sharing%20messages%20via%20ms%20teams%22.%20But%20my%20message%20can%20be%20bigger%20then%20200%20symbols%20that's%20why%20this%20kind%20of%20sharing%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CSPAN%20class%3D%22teams-share-button%22%20data-href%3D%22https%3A%2F%2Fwww.microsoft.com%2Feducation%2Fproducts%2Fteams%22%20data-msg-text%3D%22Default%20Message%22%20data-assign-title%3D%22Default%20Assignment%20Title%22%20data-assign-instr%3D%22Default%20Assignment%20Instructions%22%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Edoesn't%20suit%20me%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1249237%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EConversations%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHow-to%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2234759%22%20slang%3D%22en-US%22%3ERe%3A%20Link%2Fdeeplink%20to%20a%20new%20chat%20with%20default%20message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2234759%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F592538%22%20target%3D%22_blank%22%3E%40LiubovMurarova%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3ESee%20%3A%26nbsp%3B%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fbuild-and-test%2Fdeep-links%23generating-a-deep-link-to-a-chat%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECreate%20deep%20links%20to%20content%20-%20Teams%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3EUse%20this%20format%20for%20a%20deep%20link%20that%20you%20can%20use%20in%20a%20bot%2C%20connector%2C%20or%20messaging%20extension%20card%3A%3C%2FP%3E%0A%3CP%3E%3CCODE%3E%3CA%20href%3D%22https%3A%2F%2Fteams.microsoft.com%2Fl%2Fchat%2F0%2F0%3Fusers%3D%26lt%3Buser1%26gt%3B%2C%26lt%3Buser2%26gt%3B%2C...%26amp%3BtopicName%3D%26lt%3Bchat%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fl%2Fchat%2F0%2F0%3Fusers%3D%3CUSER1%3E%2C%3CUSER2%3E%2C...%26amp%3BtopicName%3D%3CCHAT%3E%3C%2FCHAT%3E%3C%2FUSER2%3E%3C%2FUSER1%3E%3C%2FA%3E%20name%26gt%3B%26amp%3Bmessage%3D%3CPRECANNED%20text%3D%22%22%3E%3C%2FPRECANNED%3E%3C%2FCODE%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20query%20parameters%20are%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CCODE%3Eusers%3C%2FCODE%3E%3A%20The%20comma-separated%20list%20of%20user%20IDs%20representing%20the%20participants%20of%20the%20chat.%20The%20user%20that%20performs%20the%20action%20is%20always%20included%20as%20a%20participant.%20Currently%2C%20the%20User%20ID%20field%20supports%20the%20Azure%20AD%20UserPrincipalName%2C%20typically%20an%20email%20address%20only.%3C%2FLI%3E%0A%3CLI%3E%3CCODE%3EtopicName%3C%2FCODE%3E%3A%20An%20optional%20field%20for%20chat's%20display%20name%2C%20in%20the%20case%20of%20a%20chat%20with%203%20or%20more%20users.%20If%20this%20field%20is%20not%20specified%2C%20the%20chat's%20display%20name%20is%20based%20on%20the%20names%20of%20the%20participants.%3C%2FLI%3E%0A%3CLI%3E%3CCODE%3Emessage%3C%2FCODE%3E%3A%20An%20optional%20field%20for%20the%20message%20text%20that%20you%20want%20to%20insert%20into%20the%20current%20user's%20compose%20box%20while%20the%20chat%20is%20in%20a%20draft%20state.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ENote%20%3A%20this%20currently%20(march-21)%20works%20for%20%3A%20%3CBR%20%2F%3E-%20users%20in%20the%20same%20tenant%20%2C%3C%2FP%3E%0A%3CP%3E-%20and%20x-tenant%20users%20that%20have%20been%20in%20chat%20contact%20before%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi there!

Can you help me with the link to a new chat with default message?

I have found this example 

 

https://teams.microsoft.com/l/chat/0/0?users=<user1>,<user2>,...&topicName=<chat name>&message=<precanned text>

 

but I haven't users ids to the moment I need to send message.

Actually I need to provide some kind of "sharing messages via ms teams". But my message can be bigger then 200 symbols that's why this kind of sharing

 

<span
    class="teams-share-button"
    data-href="https://www.microsoft.com/education/products/teams"
    data-msg-text="Default Message"
    data-assign-title="Default Assignment Title"
    data-assign-instr="Default Assignment Instructions"
></span>

 

doesn't suit me

1 Reply

@LiubovMurarova 
See : 
Create deep links to content - Teams | Microsoft Docs
Use this format for a deep link that you can use in a bot, connector, or messaging extension card:

https://teams.microsoft.com/l/chat/0/0?users=<user1>,<user2>,...&topicName=<chat name>&message=<precanned text>

 

The query parameters are:

  • users: The comma-separated list of user IDs representing the participants of the chat. The user that performs the action is always included as a participant. Currently, the User ID field supports the Azure AD UserPrincipalName, typically an email address only.
  • topicName: An optional field for chat's display name, in the case of a chat with 3 or more users. If this field is not specified, the chat's display name is based on the names of the participants.
  • message: An optional field for the message text that you want to insert into the current user's compose box while the chat is in a draft state.

Note : this currently (march-21) works for :
- users in the same tenant ,

- and x-tenant users that have been in chat contact before