1
votes

I have a group chat on Microsoft Teams with 4 members: 3 people and a bot. Is it possible for the bot to add a new member to the existing group chat? I found the method deleteConversationMember of the class BotFrameworkAdapter, which should remove an existing member. Well, I would need the opposite, adding a new member. I have also checked Microsoft Teams Graph API, but it seems to be possible only to get members and not add a new one.

2
What’s the use case? If we were do this without guardrails it would be a significant spam vector (bots could add themselves to any conversation). Graph could prevent against that, depending on the permissions the API requires, but still could be an issue.Bill Bliss - MSFT
I understand your concern. I implemented a Bot for ticket support and it may happen that the Bot needs to transfer a ticket to someone else. In some cases this action cannot be manual, because the person from support may not be available in that moment.user2297037
@user2297037 - Is my answer acceptable? (Since there are multiple people in this thread, you will need to @ mention me if you want me to see your reply.)Kyle Delaney

2 Answers

0
votes

As I see from your comment, you're trying to have the bot escalate, or "hand off" to a service desk agent. If that's correct, you can have a look at another model for this altogether, where the user continues to chat with the bot, but the messages are being sent, by the bot, to an agent behind the scenes. This is referred to as a "handoff", and you can see a blog post here and source code (from the blog author) here on github

0
votes

The BotFrameworkAdapter methods use the Bot Framework REST API, which itself calls channel-specific API's. As you've seen in the Teams Graph API, adding a member to a group chat is not currently supported and even if it was that Graph API is in preview and not suited for production applications. This document explains how to give feedback if you want to request this feature.

As a workaround, I recommend having the bot give the existing group members some instruction on adding the new member to the group themselves.

If you'd like to go with a bot-to-human handoff solution like Hilton suggested, you might be interested in this new sample: https://github.com/arturl/lpproxybot