Adaptive Card Action Error in Outlook Desktop but not in OOTW - outlook

I'm trying to send an adaptive card/actionable message to users in my Office 365 tenant, as a simple survey for them to fill out. I am sending the card via Microsoft Flow. The card renders perfectly in both Outlook desktop and Outlook on the Web. However, the action (HTTP POST) only works in Outlook on the Web and throws an error in Outlook desktop.
I'm using Outlook for Office 365 (ProPlus) on the Monthly Channel (targeted) version 1906. From the documentation I've seen, this should work (right?) The table here: https://learn.microsoft.com/en-us/outlook/actionable-messages/#release-notes shows that support was added in version 1805.
"type": "Action.Http",
"title": "Submit Event Summary",
"method": "POST",
"url": "https://prod-89.westus.logic.azure.com:443/workflows/.../triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=1aRUE1oGrJsr4Iz31MSkWGT9G_STEVU06B8vb_D6Zns&covered={{covered.value}}&features={{features.value}}&landmines={{landmines.value}}&comments={{comments.value}}",
"body": "",
"headers": [
{
"name": "Authorization", "value": ""
}
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
Like I said, it works and submits in Outlook on the Web, but the error in Outlook Desktop is "An error occurred. Please try again later."

There is a problem with Flow Approval buttons in build 1906 and I'm guessing adaptive cards work similarly.
https://powerusers.microsoft.com/t5/General-Flow-Discussion/Error-responding-to-Flow-Approval-in-Outlook/m-p/305111#M25905

Related

Teams Toolkit HelloWorld chat bot - Failed to send

I’ve just downloaded Teams Toolkit onto VSCode and used the plugin to create a Command Bot project. Completed all the prerequisites and configurations on my tenant (I’m the admin for our 365 business account)
Everything installs great.
I hit f5 to launch the debugger.
All prerequisite checks pass.
Chrome opens
I can [Add] my local debug bot into the web app version of teams
I go to send any message OR the helloWorld command that comes with the template app and it gives me “Failed to send message” error.
When I hit F12 to bring up the Chrome dev tools and go into the network tab to see the call that is being sent, I see and Error as the response payload: errorCode 201 errorSubCode 1 with the message “One or more of the user ids provided are not valid."
Payload:
{
"members": [
{
"id": "8:orgid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"role": "Admin"
},
{
"id": "28:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"role": "Admin"
}
],
"properties": {
"threadType": "chat",
"chatFilesIndexId": "2",
"uniquerosterthread": "true",
"fixedRoster": "true"
}
}
Response
{
"errorCode": 201,
"message": "One or more of the user ids provided are not valid.",
"standardizedError": {
"errorCode": 201,
"errorSubCode": 1,
"errorDescription": "One or more of the user ids provided are not valid."
}
}
I haven’t written any custom code or made any changes. Just trying to launch the bot straight from Toolkit creation.
I've also tested the ngrok session that is connected to make sure that communication back to me is working fine. I see logging when I try to hit the ngrok url so I feel this is a failure at the point of Teams trying to send to their API.
I’ve followed all the steps in the documentation regarding setup. I would appreciate any help anyone would have on this.
Thank you
This is probably caused by incorrectly bot identity used in Teams channel registration in Bot Framework. Not quite sure what happen when calling the bot framework service to do the bot registration herre.
You can check if your App ID and password is correctly in Bot Framework registration:
The bot credentials in .fx configs:
The app password can be decrypted from local.userdata
To resolve this, could you please try one of the following solutions:
Create a new Command Bot and run F5 again.
Or, you can delete the local.userdata and state.local.json files in your current project. And then re-run F5, the toolkit should create a new AAD app for your bot registration in this case.

MS Teams: Invoking outgoing webhook from AdaptiveCard Actions

In Teams, I have setup outgoing webhooks to process messages with mentions to outgoing webhooks name.
Currently user is having to manually type in the mention to outgoing webhook (named OutgoingHookName) to post messages to it. I like to create an adapative card action in such a way that the outgoing webhook will be triggered when user performs the card action. I tried JSON as below, but the obviously incorrect/incomplete mention (<at>OutgoingHookName</at>) did not help.
Is it possible to trigger an outgoing webhook from with an adapative card action? If not, is there an alternative other than creating a full fledged messaging bot?
{
"type": "AdaptiveCard",
"version": "1.2",
"actions": [
{
"type": "Action.Submit",
"data": {
"msteams": {
"type": "imBack",
"value": "<at>OutgoingHookName</at> ID:1234"
}
},
"title": "Invoke Webhook"
}
]
}
Currently It's not possible to invoke an outgoing webhook from AdaptiveCard Actions and currently there is no work around for this. You must use #mention in compose message area for the webhook to receive message.
Microsoft will always focus on customer’s feedback and experience, some new features would be added to the services based on customers' feedback in the future, we also recommend you give your new idea in Teams UserVoice here if this needs to be consider as a future request.

Trigger phone call (tel or sip) using Action.OpenUrl in Adaptive Card in Microsoft Teams

I am working on an adaptive card that is posted to users in Teams using Power Automate. The final thing I would like to add to the adaptive card, is a action button, that the user can click to call a person.
I have tried using both tel and sip in the URL. However nothing happens when the button is clicked.
Is this a limitation of Teams - or am I just doing it wrong?
"actions": [
{
"type": "Action.OpenUrl",
"title": "Call Matt",
"url": "tel:+4599999999",
"id": "callMeId"
}
]
Adaptive Card Designer
BR,
Niels
You need to set the Microsoft Teams as default Apps for Tel Protocol.
You can try putting following in browser: +46890510
it will navigate you to the Microsoft Teams
it will open one pop up for Teams asking to call or not

How to send a text message to a microsoft teams online meeting?

I am interested in doing the following with a csharp based teams bot:
Create an online meeting.
Invite several people into it.
Send a text message to this online meeting.
I am able to accomplish steps 1 and 2 with the graph communications api.
My bot can do many other tasks like (1) receive and reply to personal messages, (2) send proactive messages, (3) handle compose messaging extension invocations, (4) add the bot and send to groupchats, etc.
However, I have tried several approaches to step 3, and none have worked. I am getting this 403 Forbidden error when I try to send the message to the conversation:
{"error":{"code":"BotNotInConversationRoster","message":"The bot is not part of the conversation roster."}}
I have also reviewed this github thread:
https://github.com/microsoft/BotBuilder-Samples/issues/1772
I have tried adding the bot to the online meeting in a manner similar to adding the bot to a group chat, but the online meeting conversation does not appear in the search screen (when (1) going to the bot's info page from the 'Apps' menu, then (2) clicking 'Add to a chat', then (3) trying to find the conversation in the 'Select a chat to start using MyBot' search window that appears)
Add Bot to Chat
The request to send the message looks something like this:
POST https://smba.trafficmanager.net/amer/v3/conversations/19:meeting_XXXXXXXXXXXXXXXXXXXXXXXXXXXX#thread.v2/activities/f:2XXXXXXXXXXXXX
Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Type: application/json; charset=utf-8
{
"type": "message",
"serviceUrl": "https://smba.trafficmanager.net/amer/",
"channelId": "msteams",
"from": {
"id": "28:5fXXXXXXXXXXXXXXXXXXXXXX",
"name": "HelpDesk Bot"
},
"conversation": {
"id": "19:meeting_XXXXXXXXXXXXXXXXXXXXXXXXXXXX#thread.v2",
"tenantId": "XXXXXXXXXXXXXXXXXXXX"
},
"recipient": {
"id": "29:12XXXXX-XXXXXXX-XXXXXXXXXXXXXX",
"name": "SupportTest",
"aadObjectId": "XXXXXXXXXXXXXXXXXXXXXXX"
},
"text": "Welcome to the support session.",
"inputHint": "acceptingInput",
"attachments": [],
"entities": [],
"replyToId": "f:2XXXXXXXXXXXXX"
}
Am I doing something wrong?
Edit: added some more screen shots of menus available in the meeting chat room:
Online meeting menu
Compose menu
-Tom
Could you please try adding the bot from "Manage Apps" section under your meeting chat menu(the three dots next to the meeting chat title)?
You can then add the bot by choosing "upload a custom app" option from the bottom.

Simulating skype for business development environment in Microsoft BotFramework WebChat

I’m working with Microsoft bot framework (Node js) on a project with a multi chatbot approach.
After Registering the bot with the Microsoft Bot Framework, adding multiple Skype for Business channels and registering the bot to a Skype for Business different tenants(replaced by the Name parameter with the bot display name and with unique users accounts from their domain), I’m trying to identify the bot from the "bot" object inside the session message coming from SFB that will help me to detect the user domain and ensure that user is receiving the correct answers depending on his domain
When testing this approach with the emulator I’m always receiving the same bot object.
So, I’m trying to modify the BotFramework WebChat Emulator source code to emulate SFB and set the SFB dev environment with a new textbox by putting the generated sip of the chatbot in the session to test my solution.
I’m asking if there is a way to simulate SFB inside the Microsoft BotFramework WebChat Emulator?
Thank you in advance!
The Bot Framework Emulator cannot simulate Skype for Business because:
The emulator has a built in Connector Service that is modeled more after the Direct Line channel's connector service. The behavior of this service will not exactly match the behavior of the Skype for Business connector service.
The emulator uses Web Chat as the UI client. Skype for Business has various clients, and none of them will render activities the same way Web Chat does. Skype for Business clients do not support the same message types (Cards, buttons, etc).
If you are using the v4 emulator, you can modify your .bot file and provide whatever bot id you like:
{
"name": "TestBot",
"description": "",
"services": [
{
"type": "endpoint",
"appId": "",
"appPassword": "",
"endpoint": "http://localhost:3979/api/messages",
"id": "sip:testfakebotid",
"name": "http://localhost:3979/api/messages"
}
],
"padlock": "",
"version": "2.0",
"overrides": null,
"path": "C:\\BotFiles\\TestBot.bot"
}
This id will then be sent to the bot in every message, as the activity.Recipient.id:

Resources