Open paulsancer opened 6 years ago
Yes, but I'm not sure that this adapter has the correct plumbing to do so. I think we made these changes before Teams provided the email address.
I believe one of the values that the user object has now is an email address, some name qualities, and the AAD object id
Unfortunately, the email address is not one of the properties of the activity?.address?.user
object. The object is:
{ id: 'xxxxxx',
name: 'polkien',
aadObjectId: 'xxxxxx' }
Any other idea? 🤔
The only other option would be to call the roster api upon message receipt: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bots-context#fetching-the-team-roster
Nice! I will take a look and update this thread with my progress.
Hey @Polkien were you able to make progress using the team roster API?
@MattSFT, Sorry but the documentation I found for roster api is for creating teams apps (not sure how to integrate with this Hubot adapter). I need time to study everything and find a way to integrate these two pieces. Unfortunately I don't have enough time to spend on this right now but anyone else who has an idea or a clue is welcome to help! (please jeje).
@Polkien yes this would be teams specific since other channels might not have a notion of email for a user.
Hi, just checking to see if there are any updates on this, or possibly an ETA? It'd be great to be able to grab email address of people using Teams to communicate with bots.
Did anyone resolve this issue?
@vkapur I do not believe so.
Hi guys, sorry I leaved this thread but I don't even have access to a Teams instance anymore. @vkapur please try to figure out and open a PR.
Any updates in this topic? I need this feature as well.
You will need to call the roster to get the email address. It isn't available at the time of receiving a message unfortunately
@MattSFT Do you have a reference for how to call the roster for the V4 of the SDK? I could only find reference for V3 which is incompatible with V4.
This is how the BotBuilder SDK does it: https://github.com/OfficeDev/BotBuilder-MicrosoftTeams-node/blob/922d14e660cf5c5b9e510617b4cd01084483593d/samples/teams-bot/src/bot.ts#L63
@MattSFT I tried doing that but I'm getting an error when calling either getActivityMembers or getConversationMembers,, the exception is "The bot is not part of the conversation roster."
That usually happens if you are asking in a conversation where the bot has not been installed.
Are you testing using sideloading? https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/apps/apps-upload
Yes
Is there any solution for using TeamsInfo with sideloading apps?
Hello folks,
I'm trying to get user infos (email, name), anyone knows how can i do this and can explain to me in noob mode ? Thank you
Any update on this issue? How can I retrieve email id of logged in user in teams in v3?
You can get email of the logged in user with TeamsInfo class but the catch is you need to create a bot even if you only want a messaging extension. Crazy right?
I guess TeamsInfo class is supported only in v4 SDK. Currently I have configured my bot in MS teams for v3 SDK. I don't want only messaging extension. I want users email id(actually teams login id) and want to use that for other purpose. Is there any way I can get email id of current user in BOT V3 SDK?
Hello! Noob question: Is there a way to get the sender email address when using MS Teams channel?