-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get user Email address in 1-1 Private conversation in Microsoft Teams #1736
Comments
I am getting the user name and AAD object ID. |
The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repos are the preferred platform for submitting bug fixes and feature requests. That being said, I answered a very similar question recently. You basically need to query Teams for the members in the conversation. That link contains how to do it in both Node and C#. |
@satyansh-sagar Interesting. I tested the Node code in a 1:1 conversation and it worked. I'll test the C# code today. |
@satyansh-sagar I see the issue. I think you're using the wrong bit of code from that answer for this. Use this: var credentials = new MicrosoftAppCredentials("<yourAppId>", "<yourAppPassword>");
var connector = new ConnectorClient(new Uri(turnContext.Activity.ServiceUrl), credentials);
var conversationId = turnContext.Activity.Conversation.Id;
var userInfo = await connector.Conversations.GetConversationMembersAsync(conversationId ); And yes, this was in a 1:1 conversation: |
Great! This worked for me. Thank a lot @mdrichardson :) But Still I didn't got the issue root. Why that was coming as null for the C# SDK but the same thing working for node. :| |
@satyansh-sagar Tough to say. It likely has something to do with the Teams Extension. Normally, I'd say we should track it down and then submit a PR to fix. However, we're working on rolling the Teams Extension into the Bot Framework SDK, so it will likely be fixed anyway. |
How to get user email address in Private chat conversation in Microsoft teams. I'm using the v4 of bot framework.
If anyone can help me on this. :|
@msft-shahins @msftgits
The text was updated successfully, but these errors were encountered: