Action open.Url to message in Teams goes to wrong channel
See original GitHub issuePlatform
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:
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:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top GitHub Comments
Hi @maryha. We have acknowledged this issue report. Please continue to follow this issue for updates/progress/questions.
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.
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
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.