01-18-2019 02:38 AM
01-18-2019 02:38 AM
we have an external ASP.NET 4.7 App (in Azure App Service), which should send Messages/Cards to one specific User in Teams.
I managed to send Cards to Channels via the Connector/WebHook, but cannot target an specific User.
How can i do this / which Services are needed?
(pleas as simple as possible :) )
01-18-2019 04:51 AM
You could use the Activity feed API in Microsoft Graph in order to send a message/card to a specific user. More info can be found here:
"Additionally, you can also send personal chat messages into the feed as preview cards summarizing your app's activity."
01-18-2019 05:15 AM
01-18-2019 05:27 AM
As I've understood you should create a bot, using the Bot Framework, in your Application. You should add this app to Teams using an App manifest. The bot should be a Notification only bot as described here:
Have you already added your application as an App to Microsoft Teams? This way it should be able to start a proactive conversation with a user from your bot, once your app is added to a team or when installed by user (personal app).
01-18-2019 05:34 AM
01-18-2019 05:43 AM
Would you mind to describe your scenario you have in mind in more detail? I would like to address this scenario to Microsoft, in order to look if there are other possibilities. We want you to use Teams! :)
Tnx in advance!
01-18-2019 05:49 AM
01-22-2019 01:31 AM
I got some answers back and at the moment the only option is to use a bot for this. And more specifically a notifications only bot, as I mentioned before. I don't think it would be that a big of an effort to develop such a bot.
01-22-2019 01:35 AM
01-22-2019 03:12 AM
I think you can use this blog as a starting point:
The only challenge I think you will have, is that you will need a 1:1 conversation or a conversation from a team/channel with your bot first from the user who will need to be notified. This because you will need a starting chat reference as stated in the notification only bot documentation:
personalscoped notification only bot since the user cannot message your notification only bot in a personal chat. This means that you can't receive a
conversationUpdateevent that would provide you with the necessary details to send a notification. Your notification only bot will only function correctly if it supports the
teamscope and is added to a team. In the team setting, your bot will have access to the necessary information to either send a notification to a channel or privately to a user.
12-11-2019 12:33 PM
@Robert Schouten Two years ago I implemented Slack notifications with a binary file attachment in less than 2 hours. I have been trying to figure out the same with Teams for the last week and finally after getting my service to authenticate as an application against Teams I have learned I can not send a general notification message to a channel. I think I am missing something because, at least with Slack, this is a very common use case. An example scenario is sending IT a notification message when a server is down. This has nothing to do with Chat Bots and Users but instead provides a portal into reviewing important events which a group of users want to view. Is this really a limitation of Teams?
12-11-2019 07:38 PM
So we do this is a round about way. We use Flow (PowerAutomate) and watch a message queue (usually an e-mail inbox) .. parse off the subject and the body and using the Teams connector push a message into a specific team/channel. I think there is now a way to send a message to a specific user in Teams.
There are any number of actions that use the Teams FlowBot to post messages to user. or you can just post to a channel.
09-24-2020 05:22 AM
Can i ask if there is any other way to do it?
I mean to populate user feed with notifications not usings and channels or teams just to notify him from external app
09-24-2020 08:36 AMSolution
The only way to get something into the Activity feed in Teams is to post a message of some sort; either directly to the user, using a "@tag", or posting into a channel that the user has notifications turned on for.
However .. MS has a bunch of other products that you can send messages to a user in:
If anything there are almost too many ways to get a message to a user.
09-24-2020 11:48 AM
@CYappert ok so if i want to use this @mention how can i call it from API i mean how to emmbed it in to JSON
09-24-2020 12:01 PM
So the implication of my answer is that you are using PowerAutomate as your execution mechanism and taking advantage of all of the connectors and actions that PowerAutomate has.
There is a connector HTTP Request, that exposes a REST endpoint that you can post a JSON file to. I can't speak to the format of the JSON file. From there the PowerAutomate flow could pick off values in the JSON file and use it to post a message/action to a user in Teams using the Teams Connector.
Since I don't know what the external app is I have no idea how it authenticates nor can I speak to what security you would want/need to put on the REST endpoint to make sure that the endpoint isn't abused.
I know that this sounds like I'm dodging the issue ... but there is no precanned solution here.