BotBuilder-MicrosoftTeams-dotnet
BotBuilder-MicrosoftTeams-dotnet copied to clipboard
[Bug]
Describe the bug
When using:
var requestor = teamsContext.AsTeamsChannelAccount(turnContext.Activity.From);
The resulting TeamsChannelAccount object doesn't have any of the Teams specific information added. For example
request.UserPrincipalName is always null
request.Surname is also always null
SDK Version 4.0.0-beta1
Expected behavior Those properties should be populated
This is as expected. From field sends user's Id, user's AADObjectId and name.
Then how do you populate the rest of the Teams properties in resulting TeamsChannelAccount object?
Doing something like:
var roster = teamsContext.GetConversationParametersForCreateOrGetDirectConversation(turnContext.Activity.From).Members;
List<TeamsChannelAccount> rosterTC = roster.ToList().ConvertAll(member =>
{
return teamsContext.AsTeamsChannelAccount(member);
});
Also results in nulls
If you want extended information about the user, one option is to get it through Microsoft Graph. You will need additional approval from user or tenant admin for it though.
Then what is the purpose of that method? It seems to add no additional information to the default ChannelAccount object, just a bunch of properties that are always null?
GetConversationMembersAsync should have that information filled up.
Can you add an example of that? I'm having a hard time figuring out how to get a fully hydrated TeamsChannelAccount object
@RamjotSingh I'm experiencing this bug as well... Any solution available yet?
Same problem here. :/