Link/deeplink to a new chat with default message

Copper 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