Send proactive messages in MS team with no prior interaction
Issue Description
Need a feature that will send proactive notification to users present in my active directory without the user having to send a message to bot. Bot should not be able to notify users who are not in my active directory.
So we don't allow this by default because this would allow bots to spam users/reach out to users who (as you indicated) have not contacted the bot first. I don't foresee this feature being added at the moment, but a discussion may be warranted if you can share some of the details around your use case and why it should be implemented.
Closing issue due to inactivity.
It would not be a case spam because the user id would come from the azure active directory which the bot is part of. The use case is to reach out to user in the organisation..say.. the new user joined to organisation are not aware of the help chat bot. and we need to welcome aboard him on behalf of a HR. In this case user has not added the Bot to his/her conversation.
@savi-ganesh Please review this documentation: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bot-conversations/bots-conv-proactive#starting-personal-conversations
Bots can create new conversations with an individual Microsoft Teams user as long as your bot has user information obtained through previous addition in a personal or team scope. This information enables your bot to proactively notify them. For instance, if your bot was added to a team, it could query the team roster and send users individual messages in personal chats, or a user could @mention another user to trigger the bot to send that user a direct message.
You need the user’s unique ID and tenant ID to send a proactive message. Typically, these are obtained from a team context, either by fetching the team roster or when a user interacts with your bot in a channel. For bots that have already been added to the user's personal scope, you might have cached user information via the conversationUpdate event (see Bot or user added to a team).
You should use this capability sparingly and consider the user experience. Be sure not to spam end users and to send only the minimum amount of information and number of messages needed to complete your scenario.
Well , we are still dependent on the conersation update event, and though we will not get the user ids of members outside of teams group.we need user id for bot and user 1 to 1 chat
Get Outlook for Androidhttps://aka.ms/ghei36
From: Eric Dahlvang [email protected] Sent: Thursday, August 23, 2018 11:24:33 PM To: Microsoft/BotBuilder Cc: Ganesh Jadhav; Author Subject: Re: [Microsoft/BotBuilder] Send proactive messages in MS team with no prior interaction (#4339)
@savi-ganeshhttps://github.com/savi-ganesh Please review this documentation: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bot-conversations/bots-conv-proactive#starting-personal-conversations
Bots can create new conversations with an individual Microsoft Teams user as long as your bot has user information obtained through previous addition in a personal or team scope. This information enables your bot to proactively notify them. For instance, if your bot was added to a team, it could query the team roster and send users individual messages in personal chats, or a user could @mention another user to trigger the bot to send that user a direct message.
You need the user’s unique ID and tenant ID to send a proactive message. Typically, these are obtained from a team context, either by fetching the team roster or when a user interacts with your bot in a channel. For bots that have already been added to the user's personal scope, you might have cached user information via the conversationUpdate event (see Bot or user added to a team).
You should use this capability sparingly and consider the user experience. Be sure not to spam end users and to send only the minimum amount of information and number of messages needed to complete your scenario.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/BotBuilder/issues/4339#issuecomment-415510619, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AinMKHnl1qdcbLhfv8ffcMgl5_pZtM_Wks5uTuxZgaJpZM4Sx8WF.
In a Bot Handoff scenario, we do have this implemented. Can some one confirm the lifetime of the session, where I get proactive messages on selection of "Watch" command ?
How frequently do i need to send the watch command to get the details back.
At present the Watch command works for approx 30 minutes and then timesout. Can we increase the duration?
We also need this for a ticketing-style system. We want to notify users via teams when something happened. Anyone got anything running?
Crosslinking which is a discussion around handoff microsoft/BotBuilder-Samples#1133
@btastic and @vishnu2017 this issue is closed, and we encourage users to ask how-to questions your questions on Stack Oveflow, where we have an active community and support engineers answering questions. Additionally, users on Gitter (https://gitter.im/Microsoft/BotBuilder) may have also already implemented what you are looking into.
+1 On this. We'd like to be able to send users direct messages based on others actions in our web application.
Slack makes this quite straight forward. Teams does not it seems.
+1 on this too - being able to ping users in your organization proactively is very useful e.g. "hey, your direct report requested access to this application, do you approve?" or "we saw you downloaded this report, can you confirm you've deleted it?" etc.. This is possible in Slack, it would be great to use it in Teams
+1
Please refer to the documentation here: https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/send-proactive-messages?tabs=dotnet#obtain-necessary-user-information
Since this question was originally asked, other alternatives have been provided:
-
By fetching the team roster from a channel your app is installed in. (sample here: https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/57.teams-conversation-bot )
-
Proactively install the bot using the Graph api
is it any resources about "Proactively install the bot using the Graph API" option?
@mogadanez Have you found your answer for "Proactively install the bot using the Graph API" option? @EricDahlvang Do we have any feature to podcast a message to all the Bot user without sending one to one ?