A new chat with default message

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'm trying 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


    data-msg-text="Default Message"
    data-assign-title="Default Assignment Title"
    data-assign-instr="Default Assignment Instructions"


doesn't suit me.

3 Replies

@LiubovMurarova , Are you trying to deep link to chat for a specific user? You can get the user id from the bot context, the user id will a UPN or Email, which you can assign within the deep link url when you interact with the Bot. Could you please clarify few points?

1. Are you willing to send the default message on 1:1 chat?

2. Is this for channel or group conversation?

@Trinetra-MSFT  Yes, I'm trying to send the default message on 1:1 chat not to channel or group conversation.
May be your can help me with getting users id from the bot context? As I understand I need to get users list for chose one of them?

@LiubovMurarova , Yes, you can get the user id from the Bot context please take a look at Get context for you Bot