Will Conversation id in bot message change?

Teams TA 166 Reputation points
2022-06-17T04:42:40.173+00:00

I want to send something to a Teams chat by bot when my service receive message.
As we know, when user send @Bot in a one-to-one chat, we will receive an composeExtension message, we can get the conversation id in the message and response the event by conversation id.

But without any request, what should i do? I know that I can create a conversation in channel by channel id or create a conversation in user bot chat. But if i want to send proactive message to a chat or group chat, what should i do?

I found that the conversation id is same as groupChat id (id from graph api response), what's more, it also is same as channelData.setting.selectedChannel.id in installationUpdate message.
I wonder if they are related or same, and will the conversation id change in the future. If it doesn't change, can I store it to my database and use it to send proactive messages.

Please help
Thanks

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
746 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,071 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,847 questions
{count} votes

Accepted answer
  1. Sayali-MSFT 2,266 Reputation points Microsoft Vendor
    2022-06-17T12:42:25.253+00:00

    Use either the conversationReference object or conversationId and tenantId to send the message. You can get this ID by either creating the conversation or storing it from any activity sent to you from that context.

    You must only create the conversation once and store the conversationId value or conversationReference object", so we have to store the conversation id if we want to use it

    Ref: Send proactive messages - Teams | Microsoft Learn

    Thanks,

    Sayali


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link.


0 additional answers

Sort by: Most helpful