I have a use case where i would like to retrieve all the email aliases of a particular user in the Microsoft bot. Is there an API to retrieve all the alias emails of a user?
Backstory:
We're mapping users from Microsoft Teams with users of our product. When a user interacts with the bot, Microsoft Teams sends those messages from a different user id(which is an alias email for the same user). I would like a way to retrieve all the email aliases of a particular user so that I can map all of the id's in the beginning.
So I'm no expert on the email side of things, but hopefully I can at least give you some useful direction.
Hope that helps
Update: The other answer on this thread is about using the Graph API - that's what I was referring to above in point 2. In order to do that, you'll need to:
Get an id for the user, to be able to look up their email address, which you'll have from the Bot conversation (from the "From" property)
Authenticate somehow to the Graph API, in order to make a call like the other person is suggesting on this thread. If you make the call -on behalf of the user- (called a "delegated" call), you'd call the "/me/" endpoint that is being suggested in the other answer. If you instead try as an "application" id, you'd rather call /users/, as described here. But either way I think you'll need to register an Azure AD Application, so that you have the ability to call the Graph API. To do that, if you've not used Graph before, you'll need to do a bit of "getting started" reading - I'd suggest starting here.