Microsoft Teams – Azure Logic Apps – Don’t mention it!

Microsoft Teams – Azure Logic Apps – Don’t mention it!

By:

Date:

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.

Microsoft Teams - Azure Logic Apps - Don't mention it!

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:

Microsoft Teams - Azure Logic Apps - Don't mention it!

The Mention is being ignored and simply treated as plain text. So the next step is trying to edit the message:

Microsoft Teams - Azure Logic Apps - Don't mention it!

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

https://microsoftteams.uservoice.com/forums/555103-public/suggestions/17717632-support-notifications-in-messages-posted-through

 

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There’s a better way — and I can show you exactly what it looks like. I’m the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I’ve been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://staging.sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/ Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://staging.sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/ You can contact me using contact@staging.sharepains.com

6 responses to “Microsoft Teams – Azure Logic Apps – Don’t mention it!”

  1. Tim Walwyn Avatar
    Tim Walwyn

    Am trying the same thing mate 🙂 Did you manage to resolve the mentions issue?

    1. Pieter Veenstra Avatar

      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.

      1. Tim Walwyn Avatar
        Tim Walwyn

        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.

      2. Pieter Veenstra Avatar

        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.

  2. Paul Choquette (@starxed) Avatar

    Did you try escaping the @? For Flow, that means doing @@.

    1. Pieter Veenstra Avatar

      Yes i tried that a while back too. Did you have success with that?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.