Forum Discussion

mattphillips's avatar
mattphillips
Copper Contributor
Jul 15, 2022

Teams Adaptive Card Not Opening Custom URI within Channel

I've created a message with a button to call a custom URI which will open a local program, this functionality works in a personal chat directly with the bot. However it does not work within a Teams Channel on the browser or the desktop app, I'd expect it to at least open the browser but it does not even do that. 

 

{
"type": "Action.OpenUrl",
"title": "Open in Outlook",
"url": "boof://${$root.Reference}"
}

 This is the JSON I'm using for the button, I'm expecting the "URL" to be "boof://280" for example. 

 

Is there a reasoning why this functionality does not work within a channel?

11 Replies

  • Doug Routledge's avatar
    Doug Routledge
    Copper Contributor
    Same issue. FWIW it doesn't even work with tel: the protocol teams registers. It's a bug that needs to be fixed.
    • mattphillips's avatar
      mattphillips
      Copper Contributor

      {
      "type": "AdaptiveCard",
      "body": [
      {
      "type": "TextBlock",
      "size": "Medium",
      "weight": "Bolder",
      "text": "${$root.Subject}",
      "wrap": true,
      "style": "heading"
      },
      {
      "type": "ColumnSet",
      "columns": [
      {
      "type": "Column",
      "items": [
      {
      "type": "TextBlock",
      "weight": "Bolder",
      "text": "${$root.From}",
      "wrap": true
      },
      {
      "type": "TextBlock",
      "spacing": "None",
      "text": "${$root.OpenDate}",
      "isSubtle": true,
      "wrap": true
      }
      ],
      "width": "stretch"
      }
      ]
      },
      {
      "type": "FactSet",
      "facts": [
      {
      "title": "Status:",
      "value": "${$root.StatusName}"
      },
      {
      "title": "Assigned to:",
      "value": "${$root.AssignedUserName}"
      },
      {
      "title": "Priority:",
      "value": "${$root.Priority}"
      }
      ]
      }
      ],
      "actions": [
      {
      "type": "Action.ShowCard",
      "title": "Edit",
      "card": {
      "type": "AdaptiveCard",
      "body": [
      {
      "id": "Status",
      "type": "Input.ChoiceSet",
      "choices": [
      {
      "title": "Created",
      "value": "1"
      },
      {
      "title": "Acknowledged",
      "value": "2"
      },
      {
      "title": "Working On",
      "value": "4"
      },
      {
      "title": "Delayed",
      "value": "8"
      },
      {
      "title": "PassedOn",
      "value": "16"
      },
      {
      "title": "Completed",
      "value": "32"
      }
      ],
      "value": "${$root.Status}"
      },
      {
      "id": "AssignedUserID",
      "type": "Input.ChoiceSet",
      "choices": [
      {
      "title": "asdfasdf",
      "value": "81"
      },
      {
      "title": "sdfasdf",
      "value": "18"
      },
      {
      "title": "a",sdfasdf
      "value": "57"
      },
      {
      "title": "assdf",
      "value": "78"
      }
      ],
      "value": "${$root.AssignedUserID}"
      }
      ],
      "actions": [
      {
      "type": "Action.Execute",
      "title": "Save",
      "verb": "save",
      "data": {
      "AssignedUserName": "${$root.AssignedUserName}",
      "CC": "${$root.CC}",
      "CloseDate": "${$root.CloseDate}",
      "Description": "${$root.Description}",
      "From": "${$root.From}",
      "ID": "${$root.ID}",
      "LastUpdated": "${$root.LastUpdated}",
      "Notified": "${$root.Notified}",
      "OpenDate": "${$root.OpenDate}",
      "Priority": "${$root.Priority}",
      "Reference": "${$root.Reference}",
      "StatusName": "${$root.StatusName}",
      "Subject": "${$root.Subject}",
      "TimeTaken": "${$root.TimeTaken}"
      },
      "fallback": "Action.Submit"
      }
      ],
      "$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
      }
      },
      {
      "type": "Action.OpenUrl",
      "title": "Adaptive Card Docs",
      "url": "https://docs.microsoft.com/en-us/adaptive-cards/"
      },
      {
      "type": "Action.OpenUrl",
      "title": "Open in Outlook",
      "url": "boof://${$root.Reference}"
      }
      ],
      "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
      "version": "1.4"
      }

      • Prasad_Das-MSFT's avatar
        Prasad_Das-MSFT
        Icon for Microsoft rankMicrosoft

        mattphillips - We tried with below JSON to open outlook messages by sending the card having Action.OpenUrl in Channel scope and it worked fine.

         

        {
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "type": "AdaptiveCard",
        "version": "1.0",
        "body": [
        {
        "type": "TextBlock",
        "text": "Open a URL"
        }
        ],
        "actions": [
        {
        "type": "Action.OpenUrl",
        "title": "Navigate",
        "url": "https://outlook.office.com/mail/inbox/id/AAQkADNkM2FlOWNkLTA3ZDAtNDRmMC05YTZjLTY4NWI0MThiMTViNwAQADMUp%2B7ijypNrNjDSNyHuQ4%3D"
        }
        ]
        }

         

Resources