Skip to content
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

[Bug] #12

Open
clearab opened this issue Jan 25, 2019 · 9 comments
Open

[Bug] #12

clearab opened this issue Jan 25, 2019 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@clearab
Copy link
Contributor

clearab commented Jan 25, 2019

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

@clearab clearab added the bug Something isn't working label Jan 25, 2019
@clearab clearab assigned aaronlo717 and unassigned aaronlo717 Jan 25, 2019
@RamjotSingh
Copy link
Member

This is as expected. From field sends user's Id, user's AADObjectId and name.

@clearab
Copy link
Contributor Author

clearab commented Jan 26, 2019

Then how do you populate the rest of the Teams properties in resulting TeamsChannelAccount object?

@clearab
Copy link
Contributor Author

clearab commented Jan 26, 2019

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

@RamjotSingh
Copy link
Member

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.

@clearab
Copy link
Contributor Author

clearab commented Jan 26, 2019

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?

@RamjotSingh
Copy link
Member

GetConversationMembersAsync should have that information filled up.

@clearab
Copy link
Contributor Author

clearab commented Jan 26, 2019

Can you add an example of that? I'm having a hard time figuring out how to get a fully hydrated TeamsChannelAccount object

@clearab clearab closed this as completed Mar 12, 2019
@clearab clearab reopened this Mar 12, 2019
@MaikelW
Copy link

MaikelW commented May 13, 2019

@RamjotSingh I'm experiencing this bug as well... Any solution available yet?

@fmichellonet
Copy link

Same problem here. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants