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.
Related
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"}
I have a Slack App that listens to message events with the appropriate user and bot scopes (The app has im:read and im:history permissions among others, on behalf of the user). The event payload looks like this:
{"client_msg_id": "...",
"type": "message",
"text": "...",
"user": "<sender id>",
"ts": "...",
"team": "...",
"blocks": [...],
"channel": "D012345678 <example direct channel id>",
"event_ts": "...",
"channel_type": "im"}
Is there a way to identify the recipient id of this message?
I have looked into conversations_members API and used the channel_id provided by the event payload. It throws a channel_not_found error. I tried a hardcoded test with an actual private channel that the user of the app is in, and it returned the list of user-ids as expected. So it seems like the issue is related to DM channels.
Tried to use the user-id instead of the channel id as this comment suggested. Didn't work either.
Any help is appreciated.
Additional info:
pip freeze | grep slack
slack-bolt==1.13.2
slack-sdk==3.16.1
For anyone who is facing the same issue, I asked the SlackBolt devs to pitch in and here's their answer. . In summary, conversation_members mentioned in the questuon is the correct starting point. But if both your user and bot tokens have im:read permissions, the priority is to the bot token. Replace it with user token and you should be fine. More elaborate answer is in the discussion link.
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.
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}
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