justintimeinstallation without submit action in teams - microsoft-teams

on MessageExtensionfetchtaskasync we are checking if the bot is not installed in the user conversation using the justintimeinstallation:true we are installing the bot in that user conversation but my client don't want to click on the button if the bot is not installed in the user it has to install automatically without user click of the button
Please let us know instead of Action.Submit how to install the bot in the user conversation
{
"type": "AdaptiveCard","body": [{"type": "TextBlock", "text": "Looks like you haven't used ACS Shout Outs (Give badge) in this team/chat. Please click Continue to add and use this app.","wrap": true}],"actions": [{ "type": "Action.Submit","title": "Continue", "data":{"msteams": { "justInTimeInstall": true}}}],"version": "1.0"}

Related

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

Can you use slack buttons non-interactively?

While using Slack's block kit builder, I created a message that would send a notification as well as a link for the user to click on. I like the way the default button looks, but I get a warning whenever I click it saying my app isn't configured for interactivity.
The link does work, but the warning icon is unsettling. Is there a way to use these buttons without expecting interactivity? The alternative seems to be to just use a markdown link, but I don't think it looks as nice.
My block:
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Hello here's a notification"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<https://google.com|View Conversation>"
}
}
]
}
If I send this block straight from the block kit builder there's no warning message. I'm guessing this is because it gets sent as my user as opposed to an app.
As of now, there is no way to set up a block kit button without interactivity. i.e., when someone clicks on the button (with or without a URL), Slack sends a request to the preconfigured URL in your app config. The app needs to acknowledge this request and send an HTTP 200 OK response, in order for the button URL to work without the error sign.
You can read a rather detailed discussion on Slack's GitHub here.
A workaround, for now, would be to set up a webhook URL somewhere on the web (google cloud run could be a good free solution) which returns an acknowledge response. You can then alter your app's config to use this URL for app interactivity.
p.s. When you use block kit builder to send a preview message to Slack, it uses the same user token as the one used by Slack web app. The behavior you noted above can't be replicated when you use any other user token (received from an app's install flow).

How can a microsoft botframework bot mention a user in an adaptivecard?

Following the Schema explorer at adaptivecards.io, there is no schema available for a bot mentioning a user (and teams sending him the proper notification that he was mentioned afterwards).
See https://adaptivecards.io/explorer/ for reference.
We want to use the bot for proactive messages to our users. If a user gets mentioned in one other solution, we want to transfer that mentioning event to the teams channel conversation and leverage the ability of teams to notify the user appropriately.
Question: Is there a way to add a valid teams #mention to a channel member in a bot message using adaptivecards?
Mentioning users can be done in AdaptiveCards according to this documentation: https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cconnector-html#mention-support-within-adaptive-cards
To include a mention in an Adaptive Card your app needs to include the following elements
<at>username</at> in the supported adaptive card elements
The mention object inside of an msteams property in the card content, which includes the Teams user id of the user being mentioned
The mention object looks similar to this:
{
"msteams": {
"entities": [{
"type": "mention",
"text": "<at>John Doe</at>",
"mentioned": {
"id": "8:orgid:{org-ID-of-the-user}",
"name": "John Doe"
}
}]
}
}
The ID to mention a user needs to be in this format: 8:orgid:{org-ID-of-the-user}

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.

Adaptive Card Action Error in Outlook Desktop but not in OOTW

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

Resources