Today I tried to create an Azure Logic app that creates a message in a Channel within a Microsoft Teams team. This was amazingly easy.
But then the trouble started. I wanted everybody to receive an alert using the Mentions in Microsoft Teams. My team name is Triad.Microsoft.Development so @Triad.Microsoft.Development should work.
Even the code view looks ok to me:
{ "inputs": { "host": { "connection": { "name": "@parameters('$connections')['teams']['connectionId']" } }, "method": "post", "path": "/beta/groups/@{encodeURIComponent('2d7f5296-cf27-408e-9e5a-dac219e97084')}/channels/@{encodeURIComponent('12aad3df-90b5-433b-81ce-8e4c444bc127')}/chatThreads", "body": { "rootMessage": { "body": { "content": "PLEASE IGNORE THIS MESSAGE\n\nHi @Microsoft.Development, Please reply with what you were working on yesterday, what you are planning to work on today and if there are any impediments.", "contentType": 1 } } }, "authentication": "@parameters('$authentication')" } }
But now when I look at the Message in Teams:
The Mention is being ignored and simply treated as plain text. So the next step is trying to edit the message:
I also tried the same with Microsoft Flow and the same issue is there too. I guess Microsoft Flow and Azure Logic Apps are using the same engine in the background.
So I contacted @AzureSupport on twitter and after a short discussion they asked me to open the issue on the MSDN forum.
Uservoice
[…] section of Microsoft Teams using Microsoft Flow and Azure Logic Apps and I found that I hit a few limitations. Well a lot of this is still in preview so some limitations can be […]
Am trying the same thing mate 🙂 Did you manage to resolve the mentions issue?
Hi Tim, No as far as I know this doesn’t work yet. I’ve reported it to Microsoft and it is on their radar now. I think the problem is that the app does some magic and converts the @… into a user object. This should really be done in the API.
Ah that’s a shame – I came across this: https://stackoverflow.com/questions/41440803/how-to-mention-a-user-group-in-a-new-message-to-a-channel it’s not quite flow/logic apps friendly yet but is possible with a bit more effort.
Hmm, that might open doors. Maybe some c# or node.js with a function app? Not sure if that is possible, but maybe worth a try.
Did you try escaping the @? For Flow, that means doing @@.
Yes i tried that a while back too. Did you have success with that?