- The Connector Id in Microsoft Teams is unique per bot per channel, even in a multi-tenant scope. This means that each bot installed in a specific channel within a team will have a unique Connector Id. This uniqueness ensures that messages sent by the bot are directed to the correct channel and do not interfere with other bots or channels within the same organization or across multiple organizations.
- When storing the conversation Id for proactive messaging across multiple organizations within the scope of Microsoft Teams, it's important to ensure that the conversation Id is associated with the correct user or channel to avoid any message misdirection. By using the correct conversation Id, you can target specific users or channels for proactive messaging without the risk of messages being posted to unintended recipients.
To implement proactive messaging in Microsoft Teams using the Bot Framework Connector SDK for Python, you can follow these steps:
- Listen for the
on_members_added
event to capture the necessary information when a user installs the bot in personal scope or group chat. - Retrieve the conversation Id from the
turn_context.activity.conversation.id
property to store it for proactive messaging. - Use the stored conversation Id along with other required information (such as
aadObjectId
,userId
,tenantId
, andserviceUrl
) to create the conversation for proactive messaging. - Ensure that the proactive messages are targeted correctly by verifying user accessibility and channel availability using the Microsoft Graph API if needed.
Thanks,
Prasad Das
*************************************************************************
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.