Search code examples
node.jsbotframeworkskypeskype-for-business

How to get user email from botbuilder with Skype for Business?


I'm using botbuilder package in a nodejs application and I need to get the user information from the Skype for Business channel, so that I can authorize against my custom authentication system - the username would work too. Using session storage or anything like this doesn't work for my use case, so I need the actual user information. How can I get this information?


Solution

  • In Skype for Business channel, you will found the user email in the id field of the user.

    • In Node.js: session.message.address.user.id field
    • In C#: activity.From.Id field

    It has the following format: sip:mymail@mydomain.com