graphapi
31 TopicsReplies not included when retrieving messages using GraphApi
Hi Team, We've noticed that when we retrieve a message using the https://learn.microsoft.com/en-us/graph/api/chatmessage-get?view=graph-rest-1.0&tabs=http for a message that is a reply to another message we are missing an attachment. This only happens to message that are sent by a Teams bot. These attachments used to always be present for replies but now are missing. Steps to reproduce Start the Echo bot from the sample templates (I used Teams Toolkit to deploy it to Teams or run it in the Test tool). In addition, I followed http:// https://learn.microsoft.com/en-us/graph/tutorials/typescript-app-only?tabs=aad to add the graph Api to my bot. Give the permission ChatMessage.Read.All to the application created by the Teams Toolkit. In the graphHelper.ts file, add the following function: export async function getMessage(conversationId: string, messageId: string) : Promise<any> { return _appClient.api('/chats/'+conversationId+'/messages/'+messageId) .get(); } In the TeamsBot.ts file, modify the onMessage function by replacing await context.sendActivity(...) with the following code. const message = await getMessage("19:email address removed for privacy reasons.spaces", context.activity.id); if (message.attachments.length == 0) { await context.sendActivity("No reply message found"); } else { await context.sendActivity("Reply message found<br/>" + message.attachments[0].content); } Note: For simplicity the conversation Id is hard coded with the one used for my tests here Observed behaviour: First case: Message with no reply We don't receive any attachment as expect because this not a reply message. Second case: Message that replies to my own message. We receive an attachment as expected because this is a reply message Third case: Message that replies to a bot message We don't receive any attachment. This is unexpected as this is a message reply. The third case is surprising to us as it used to work the same way as the second case but now we get an inconsistent behaviour. Can you advise if this is an expected behaviour ? Is there a workaround to simply parse message replies ? Thank you !140Views1like1CommentHow to send a message to a thread (reply) using botbuilder 4.0 SDK
How to send a message to a thread (reply) using botbuilder 4.0 SDK Scenario:- 1. User A -> Types a message in Teams App (bot) 2. Now Bot has to reply to the same thread that user A has started in Teams App (bot) I am able to send a new message in the Teams App (bot) - Not expected The bot needs to reply to the same thread the user started - Expected If you have any document link or example, please point it out. Thank you.4KViews1like15CommentsAdd Cloud Storage with Graph API
Hello, I am currently creating a tool which allows us to automatically create teams based on an external source. Most settings could be manged via the Graph API (members, tabs, channels). I would like to add an additional cloud storage source (Sharepoint Document Library) to the files tab but i couldn't find any description how to do so. Neither via the Graph API or any other way that could be automated. Is this currently not possible?Solved3KViews1like3Comments