May 12 2021 01:23 PM - edited May 12 2021 01:24 PM
Hello,
I guess we could get all users info by using TeamsInfo.GetPagedMembersAsync... I believe it should list all members.... then is there any method that I can use to search based on user email address to get the TeamsChannelAccount instance?
I mean..say one user(myuser1234@mycompany.com) is a member...I guess we can use TeamsInfo.GetPagedMembersAsync then iterate every objects to compare each one to math Email property with myuser1234@mycompany.com .. Then isn't it too slow?
I noticed TeamsInfo.GetMemberAsync..however, it accepts user id as a form of unique id like "28:.blahblah"...,...in that parameters.....So is there any method something like maybe...Teamsinfo.GetMemberByEmailAsync(context, "myuser1234@mycompany.com",cancellationToken)?? So I can easily look up with the specific user email address to obtain the TeamsChannelAccount instance for that account?
Thanks,
May 19 2021 08:42 PM - edited May 19 2021 09:26 PM
Hi @firstteam, Could you please test in graph, user must be in same domain.
May 20 2021 04:34 AM
May 24 2021 03:16 AM
Hi @firstteam, currently its not possible to get TeamsChannelAccount instance
using user email id. Instead we can try graph API (GET https://graph.microsoft.com/v1.0/users/userPrincipalName) to get user id using email address.