GraphAPI
8 TopicsReplies not included when retrieving messages using GraphApi
Hi Team, We've noticed that when we retrieve a message using the Get chatMessage in a channel or chat Api 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 the following tutorialto 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 !54Views1like1CommentHow 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.3.7KViews1like15CommentsRoster update missing and recording bot
Hello, I have several bots running on my company's tenant. One is a recording bot, using nugget Microsoft.Skype.Bots.Media (1.23.0.49-alpha) Another is a calling bot using directly the Microsoft GRAPH API, without any SDK. The calling bot creates a 1:1 call with a user, then escalates the call into a conference by inviting other users. Everything works well, except when the very first user is recorded. In that case only, the calling bot does not receive roster update notifications. Here is an extract of the calling bot logs, showing the lack of notifications. 220607;10:20:08.449;[00415];019;APP_CALL;CREATE_CALL;7681;RestRequest;GetWebRequest;T;>>>>>> request type=CreateCallRequest uri=https://graph.microsoft.com/v1.0/communications/calls method=POST content=application/json raw={"tenantId":"bd194de5-c933-499f-ac81-2f54715b7525","callbackUri":"https://XXXXXXX-teams-gateway.francecentral.cloudapp.azure.com:8544/callback/call","mediaConfig":{"@odata.type":"#microsoft.graph.serviceHostedMediaConfig","preFetchMedia":[]},"source":{"identity":{"application":{"id":"c02ef987-b36c-4fea-9a69-2ab6c818a7ba","displayName":"TANNCE","name":"TANNCE"}}},"targets":[{"identity":{"user":{"id":"a75f8483-9fb4-4e07-8e41-6ef5d1e928b0"}}}]} 220607;10:20:08.528;[00057];019;APP_CALL;CREATE_CALL_ACK;7681;StringResponse;ReadInternal;T;<<<<<< request type=CreateCallRequest response={"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#communications/calls/$entity","id":"631f5e00-edf0-44e3-a73d-32d236efe5a7","state":"establishing","transferState":null,"terminationReason":null,"direction":"outgoing","ringingTimeoutInSeconds":null,"subject":null,"callbackUri":"https://XXXXXXX-teams-gateway.francecentral.cloudapp.azure.com:8544/callback/call","requestedModalities":[],"activeModalities":[],"routingPolicies":[],"tenantId":"bd194de5-c933-499f-ac81-2f54715b7525","myParticipantId":"10ba0fc2-d01d-4cb7-a6af-59348c7b789e","callChainId":"9f155eed-bc5b-461e-a593-68c6efa15d5c","mediaHostedRegion":null,"mediaState":null,"resultInfo":null,"answeredBy":null,"chatInfo":null,"meetingInfo":null,"transcription":null,"callOptions":null,"meetingCapability":null,"breakoutDetails":null,"pstnDetails":null,"toneInfo":null,"incomingContext":null,"terminationSender":null,"meetingGroupDetails":null,"callRoutes":[],"source":{"endpointType":null,"region":null,"languageId":null,"countryCode":null,"participantId":null,"identity":{"user":null,"phone":null,"guest":null,"encrypted":null,"onPremises":null,"applicationInstance":null,"device":null,"application":{"id":"c02ef987-b36c-4fea-9a69-2ab6c818a7ba","displayName":"TANNCE","tenantId":null,"registrantId":null,"name":"TANNCE"}}},"targets":[{"endpointType":null,"replacesCallId":null,"hidden":null,"removeFromDefaultAudioRoutingGroup":null,"participantId":null,"identity":{"phone":null,"guest":null,"encrypted":null,"onPremises":null,"applicationInstance":null,"application":null,"device":null,"user":{"id":"a75f8483-9fb4-4e07-8e41-6ef5d1e928b0","displayName":null,"tenantId":null,"registrantId":null}}}],"mediaConfig":{"@odata.type":"#microsoft.graph.serviceHostedMediaConfig","preFetchMedia":[]}} 220607;10:20:08.563;[00879];026;SERVER;CALLBACK_CALL_ACK;E320;QServer;EndOp;X;<<<<<<<<<< {"@odata.type":"#microsoft.graph.commsNotifications","value":[{"@odata.type":"#microsoft.graph.commsNotification","changeType":"updated","resource":"/app/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7","resourceUrl":"/communications/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7","resourceData":{"@odata.type":"#microsoft.graph.call","state":"establishing","callChainId":"9f155eed-bc5b-461e-a593-68c6efa15d5c"}}]} 220607;10:20:12.860;[00879];026;SERVER;CALLBACK_CALL_ACK;9D44;QServer;EndOp;X;<<<<<<<<<< {"@odata.type":"#microsoft.graph.commsNotifications","value":[{"@odata.type":"#microsoft.graph.commsNotification","changeType":"updated","resource":"/app/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7","resourceUrl":"/communications/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7","resourceData":{"@odata.type":"#microsoft.graph.call","state":"established","direction":"outgoing","callChainId":"9f155eed-bc5b-461e-a593-68c6efa15d5c"}}]} 220607;10:20:12.971;[00879];026;SERVER;CALLBACK_CALL_ACK;8F2E;QServer;EndOp;X;<<<<<<<<<< {"@odata.type":"#microsoft.graph.commsNotifications","value":[{"@odata.type":"#microsoft.graph.commsNotification","changeType":"updated","resource":"/app/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7","resourceUrl":"/communications/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7","resourceData":{"@odata.type":"#microsoft.graph.call","state":"established","mediaState":{"@odata.type":"#microsoft.graph.callMediaState","audio":"active"},"callChainId":"9f155eed-bc5b-461e-a593-68c6efa15d5c"}}]} 220607;10:20:12.971;[00415];019;APP_CALL;INVITE_PARTICIPANT;5E5A;RestRequest;GetWebRequest;T;>>>>>> request type=InviteParticipantsRequest uri=https://graph.microsoft.com/v1.0/communications/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7/participants/invite method=POST content=application/json raw={"participants":[{"identity":{"user":{"id":"d609b7e5-49ad-4d84-9cfa-5107e5f0fd51"}}}],"clientContext":"631f5e00-edf0-44e3-a73d-32d236efe5a7"} 220607;10:20:13.060;[00057];019;APP_CALL;INVITE_PARTICIPANT_ACK;5E5A;StringResponse;ReadInternal;T;<<<<<< request type=InviteParticipantsRequest response={"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#inviteParticipantsOperation","@odata.type":"#microsoft.graph.inviteParticipantsOperation","id":"225aacaa-cc93-4dab-b85e-05c3d418dbe5","status":"Running","clientContext":"631f5e00-edf0-44e3-a73d-32d236efe5a7","resultInfo":null,"participants":[{"endpointType":null,"replacesCallId":null,"hidden":null,"removeFromDefaultAudioRoutingGroup":null,"participantId":"0291aa8a-e2ce-4fc5-8b46-c6c21a05a25b","identity":{"phone":null,"guest":null,"encrypted":null,"onPremises":null,"applicationInstance":null,"application":null,"device":null,"user":{"id":"d609b7e5-49ad-4d84-9cfa-5107e5f0fd51","displayName":null,"tenantId":"bd194de5-c933-499f-ac81-2f54715b7525","registrantId":null}}}]} 220607;10:20:17.254;[00879];026;SERVER;CALLBACK_CALL_ACK;7AD9;QServer;EndOp;X;<<<<<<<<<< {"@odata.type":"#microsoft.graph.commsNotifications","value":[{"@odata.type":"#microsoft.graph.commsNotification","changeType":"deleted","resource":"/app/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7/operations/225aacaa-cc93-4dab-b85e-05c3d418dbe5","resourceUrl":"/communications/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7/operations/225aacaa-cc93-4dab-b85e-05c3d418dbe5","resourceData":{"@odata.type":"#microsoft.graph.inviteParticipantsOperation","participants":[{"@odata.type":"#microsoft.graph.invitationParticipantInfo","identity":{"@odata.type":"#microsoft.graph.identitySet","user":{"@odata.type":"#microsoft.graph.identity","id":"d609b7e5-49ad-4d84-9cfa-5107e5f0fd51","tenantId":"bd194de5-c933-499f-ac81-2f54715b7525"}},"participantId":"0291aa8a-e2ce-4fc5-8b46-c6c21a05a25b"}],"status":"completed","clientContext":"631f5e00-edf0-44e3-a73d-32d236efe5a7","id":"225aacaa-cc93-4dab-b85e-05c3d418dbe5"}}]} 220607;10:20:29.234;[00879];026;SERVER;CALLBACK_CALL_ACK;9C9C;QServer;EndOp;X;<<<<<<<<<< {"@odata.type":"#microsoft.graph.commsNotifications","value":[{"@odata.type":"#microsoft.graph.commsNotification","changeType":"deleted","resource":"/app/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7","resourceUrl":"/communications/calls/631f5e00-edf0-44e3-a73d-32d236efe5a7","resourceData":{"@odata.type":"#microsoft.graph.call","state":"terminated","resultInfo":{"@odata.type":"#microsoft.graph.resultInfo","code":200,"subcode":5010,"message":"This conversation has ended as only one participant was remaining in the conversation.. DiagCode: 0#5010.@"},"callChainId":"9f155eed-bc5b-461e-a593-68c6efa15d5c"}}]} Best regards, David CHOLLET2.4KViews0likes7CommentsIVR Scenario Problems
Hey There I have a MS Graph Bot for Teams and have to play a .Wav File during a Call. I can start this Call and Manage it very well over Graph. But when I want to start a Sound I become Completed. But No Sound starts. When I read the results of the Call I see 2 Error Messages: What am I doing Wrong? Best Regards Swess2.5KViews0likes14CommentsAdd 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?Solved3KViews1like3CommentsBad Gateway when adding certain users to channel
I have a very interesting problem where i get a 502 Bad Gateway error when adding certain users to a team or channel via the graph API. https://docs.microsoft.com/en-us/graph/api/team-post-members?view=graph-rest-beta&tabs=http https://docs.microsoft.com/en-us/graph/api/conversationmember-add?view=graph-rest-beta&tabs=http Both fail for these users. The users are always the same. If use the group to add a member to the team https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-beta&tabs=http it works for these users. But as far as i know there is no equivalent way to add members to channels. I couldn't find any obvious difference between the users. If i add them manually via the Teams client there are no problems. Any one got an idea whats the problem or how to solve this? Thanks1.3KViews0likes3CommentsHow to generate or create chat id of MS teams using Graph API ?
I got the list of chat Id's. I did conversation in MS teams from GET - https://graph.microsoft.com/beta/me/chats/ using graph API (Graph Explorer) Is there any way to generate chat Id with the help of user Id with whom I never chat yet.25KViews0likes5Comments