Forum Discussion

firstteam's avatar
firstteam
Copper Contributor
May 12, 2021

Would it be possible to get TeamsChannelAccount instance by querying user email address somehow?

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,

 

Resources