Forum Discussion
Teams Notification Bot: TeamsInfo.getPagedMembers is sometimes not returning newly added members
Do you have any suggestions for how to reconcile users coming in though the 2 places above then? Most users have an email but not all, they all have userPrincipalName but sometimes that is not the email....is there any consistent identifier I can use instead of these?
Right now my best approach would have to be checking for email and falling back to userPrincipalName but it sounds like that is not a clean solution a small subset of users will continue to have this issue
alexkovalev - AAD Object Id of the user should be consistent for all the user. I think this would be enough for you to check.
Have a look in doc as well - https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.schema.teams.teamschannelaccount?view=botbuilder-dotnet-stable#properties
Let us know if you have any query.
Thanks,
Hunaid L Hanfee
-----------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- HunaidHanfee-MSFTJan 07, 2022Iron Contributor
alexkovalev - Yes, it came as property oid in the token you get. You should be able to see it when you get token, copy it and paste it in JSON Web Tokens - jwt.io debugger.
- alexkovalevJan 06, 2022Copper Contributor
Got it, thanks. We will switch to this eventually, it's a bit of a bigger refactor but we will move to this approach. One last question, does Microsoft OAuth also gives the AAD ID of the user, or are additional API calls needed to figure this out after signing a user in through oauth?