microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.47k stars 2.44k forks source link

Passing The Message Directly To Teams Chatbot On Behalf Of User #6582

Closed amreshgarg21 closed 1 year ago

amreshgarg21 commented 1 year ago

Is there a way through which we can pass the messages to the team's chatbot on behalf of the user?

I tried using the ms teams deep link: https://teams.microsoft.com/l/chat/0/0?&message=Hi

But here the user needs to press enter key or send button in order to send the message. I want to directly send it without pressing the send button in MS Teams.

anishprasad01 commented 1 year ago

Hi @amreshgarg21,

It's not entirely clear to me what you are attempting to do. Could you please explain your goal and what bug or feature request you are submitting?

amreshgarg21 commented 1 year ago

Like I want to pass the message e.x. "Topics" when the user clicks the button, so he/she gets redirected to his/her Teams Chatbot with that message "Topics" and it should be automatically sent on behalf of the user rather than the user pressing the send button or pressing enter button.

Does there exist a way to do so?

anishprasad01 commented 1 year ago

I'm afraid I'm still unclear on what you're trying to implement. Perhaps you could explain the overall flow of the application, how a user should interact with it, and what the bot should do.

amreshgarg21 commented 1 year ago

So, we wanted to sent a message into the chatbot(ms-teams channel).

Is there any API available to post the message into the chatbot on behalf of user (proactive notification will send the message bot to user, similar way without any user intervention how user can send a message to chatbot through any API.)

NOTE: We have tried deep link concept but the only problem is that the user need to enter the send button to process the chatbot.

anishprasad01 commented 1 year ago

You are going to send a message to the bot, and you want to bot to impersonate the user and post that into the channel?

amreshgarg21 commented 1 year ago

Yes

anishprasad01 commented 1 year ago

As far as I am aware, bots impersonating human users is not permitted in Microsoft Teams. You can make use of Microsoft Graph to proactively install and send messages to users without needing them to take explicit action, but these messages will come from the bot, not as another user. The message you send can contain the name of the original sender, but the bot cannot appear as that first sender.