Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reply to a conversation thread in teams using Teams bot #6653

Open
Ajaykumar661 opened this issue Jun 13, 2024 · 2 comments
Open

Reply to a conversation thread in teams using Teams bot #6653

Ajaykumar661 opened this issue Jun 13, 2024 · 2 comments
Labels
Area: Teams The issue is related to Teams support

Comments

@Ajaykumar661
Copy link

Ajaykumar661 commented Jun 13, 2024

I have a bot that is created by using Microsoft botframework sdk, I'm trying to find a way to reply to a conversation thread in a teams Channel conversation without being prompted first by a user. So for example given a certain condition (eg. triggered by some event such as time of day, a pull request, etc.) it posts a message in a channel to a particular thread. I have read the documentation on the proactive messaging in teams. I gather that in order to send a message to a teams channel, the bot needs to know the "conversationId" of the user. This information is stored in the conversationreference object, and it gets this from the current conversation. However, in my case I don't have a 'current conservation', because I don't want to just respond to a user, I want to post a reply to a thread proactively. How can I achieve this ?

So far what I tried is to follow this document Graph API, to reply to a conversation using message id using graph api. But since the token is procured on behalf of the user, the reply is posted as a user. Is there a way to post the message reply using graph api by bot ?

Also, I followed a document where the bot can read any messages without being mentioned using @ by following. So I thought we will be getting the user's conversation id in the context object whenever there is a new message in the channel RSC permissions, but it doesn't seems to be working out for me, I'm not sure if I'm missing out on anything

Any guidance on this would be helpful!

Tasks

No tasks being tracked yet.
@Ajaykumar661
Copy link
Author

Ajaykumar661 commented Jun 13, 2024

@Prasad-MSFT I've seen you answered to questions regarding RSC permissions, mentioning you for better reach and quicker solution....Thanks

@stevkan stevkan self-assigned this Jul 10, 2024
@tracyboehrer tracyboehrer added the Area: Teams The issue is related to Teams support label Jul 16, 2024
@tracyboehrer
Copy link
Member

Teams can handle proactive in ways that Azure Bot Service can't. The Bot Framework proactive sample demonstrates the ABS way, which requires a ConversationReference. i.e., The conversation was initiated by the user.

The Teams folks would know more about this, but I did find this: https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bot-conversations/bots-conv-proactive?tabs=csharp

@stevkan stevkan removed their assignment Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Teams The issue is related to Teams support
Projects
None yet
Development

No branches or pull requests

3 participants