question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Action open.Url to message in Teams goes to wrong channel

See original GitHub issue

Platform

Microsoft Flow Action - Post an adaptive card to user as Flow Bot

Author or host

I am adding the JSON for the adaptive card to the flow action to post the message

If you’re an author, who are you sending cards to? The Adaptive Card is sent as a personal message to a specified user in the Flow Action

Issue

The Flow I created is triggered by a new message in a Team Channel (not the General channel). The web url of the message is parsed out of the trigger JSON.
A message alerting a user about the post is sent to the user with the Post an adaptive card to user as Flow Bot. In the JSON, there is a text block that gives the URL:

  {
            "type": "TextBlock",
             "text": "[View Message](@{body('Parse_JSON')?['webUrl']})"
   }

I also added an action to open the message url:

    "actions": [
        {
            "type": "Action.OpenUrl",
            "title": "View message in channel",
            "url": "@{body('Parse_JSON')?['webUrl']}"
        }

The message gets posted successfully in Teams:

AdaptiveCardMessage

If I click on the “View Message” URL - it tries to open it in a browser which then sends the user back to Teams to the message from the URL.

If I click the “View message in channel” action, the user stays in Teams, but is redirected to the message Team’s General channel and most recent message - not to the message associated with the URL.

Ideally, I should get a combination of the two behaviors - stay in Teams and go to the right channel/message. If that is not possible, then the Action Open.URL should be the same as clicking the message URL so that the user ends up at the right place.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
msftbot[bot]commented, Jul 30, 2020

Hi @maryha. We have acknowledged this issue report. Please continue to follow this issue for updates/progress/questions.

1reaction
ChristopherP1221commented, May 9, 2020

Hello,

Can we re-open this request? We’ve determined this is not something that’s related to the Flow App. We’re actually building an adaptive card through the Graph API now and noticing some inconsistent behavior. Specifically, it appears MS Teams handles opening the same URL differently if posted a couple of different ways in the same message. What’s even stranger is the behavior I’m seeing today is different than it was just 24 hours ago.

Below are the 3 ways we’re trying to link to a channel in a different team.

  1. Within an adaptive card, using Action.OpenUrl, posted via graph API
  2. Within an adaptive card, creating linkable text (i.e. channel-abcd) through HTML, posted via graph API
  3. Outside of the adaptive card, long hyperlink (https://teams.microsoft.com…)

We are specifically testing a use case where the user clicking the link IS NOT part of the team we’re redirecting to.

Last night’s behavior Windows Desktop Client

  1. Action.OpenUrl – redirects me to the General channel of the first team listed in my sidebar under “Your Teams”
  2. Linked text – redirects me to a Chrome web browser, when I click “Open Microsoft Teams,” I am redirected to the “join team” workflow which presents me with an option to join the team that’s hosting the channel I want to link to
  3. Link outside of the adaptive card – brings me directly to the “join team” workflow WITHIN the MS Teams client – this is the desired behavior in a case where the user is not a member of the Team

Mobile Client – Triggered the “join team” workflow for all 3 cases above

Today’s behavior Desktop Client – exactly the same behavior as what’s been posted above for all 3 types of links Mobile Client – today, this redirects to a page within the client that lists the channel name at the top of the page and message saying “You’re no longer a member of this team.” The “join team” is no longer triggered in any of the 3 case cases. This is problematic for the use case we’re trying to solve for. I’m hoping there’s a workaround or some other way to get this link to trigger the “join team” workflow as it was doing last night!

Please let me know if there are any other details I can provide.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Teams Adaptive Card Not Opening Custom URI within ...
I've created a message with a button to call a custom URI which will open a local program, this functionality works in a...
Read more >
Copy Link is not an option
I wish to share a link to a specific message in Teams chat ... It's available for Teams channel messages, but not for...
Read more >
Team Channel: Card with button. Specific URL for each ...
Now this button opens a fixed URL in the pc browser ('Action.OpenUrl'). The URL is the same for all teams members, since the...
Read more >
Solved: post link (URL) to Microsoft Teams chat
Solved: Hi all, I'm building a flow where after an excel file on SharePoint is modified send to specific channel a message with...
Read more >
Deep link to a Teams chat
Deep link to start a new chat; Deep links to navigate to channel ... in your card's button or tap action through the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found