question

MohamadNajia-0546 avatar image
1 Vote"
MohamadNajia-0546 asked romungi-MSFT commented

1:1 conversation on message extension retrieve members emails

Hello everyone,

So i created a message extension using bot framework v4.
What am trying to do is to retrieve members emails in 1:1 conversation using the message extension on OnTeamsMessagingExtensionSubmitActionAsync. However am getting 403 Forbidden.

The next step I tried to add the Bot to the conversation using AdaptiveCards and I get the following error

The bot is not part of the conversation roster

Moving forward to Microsoft Graph API as mentioned in https://docs.microsoft.com/en-us/graph/api/conversationmember-list?view=graph-rest-beta&tabs=csharp to use :

 GraphServiceClient graphClient = new GraphServiceClient( authProvider );
    
 var members = await graphClient.Me.Chats["{id}"].Members
  .Request()
  .GetAsync();


Now a new issue graphClient.Me.Chats in visual studio : IUserRequestBuilder doesn't not contain a definition for Chats.

I find it a little bit weird to not able to retrieve what's already obvious. I can see the contact email and name so the 403 is absurd in my own opinion or I might be doing something wrong.

Thank you

.




azure-bot-serviceazure-ad-graph
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MohamadNajia-0546 avatar image
2 Votes"
MohamadNajia-0546 answered romungi-MSFT commented

So the issue was I need to add the Microsoft.graph.beta from the package manage console Install-Package Microsoft.Graph.Beta -Version 0.19.0-preview. https://stackoverflow.com/questions/62521896/using-microsoft-graph-api-to-retrieve-chat-members

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MohamadNajia-0546 Thanks for sharing the resolution. It would be great if you can accept the answer so anybody facing the same issue can use this resolution.

0 Votes 0 ·