Reputation: 175
I’ve seen how to get the current user in a Teams BOT conversation (https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bots-context). It seems that authenticating this user is currently not really easy (https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/authentication). The idea is to authenticate the user automatically (in the end, we are already in Teams, in O365), and get a bearer token to do WebAPI calls in O365. Does anyone have a working POC?
Btw the goal is to achieve something like https://stephaneeyskens.wordpress.com/2017/01/07/transparent-bot-authentication-with-microsoft-teams/, but the example is not complete (and it is one year old, so maybe there is something new OOTB).
Upvotes: 2
Views: 389
Reputation: 14589
Sadly that's not possible: your bot in MS Teams doesn't get the token of the user.
The sample you are quoting is not MS Teams channel but a hack using a Webchat included in MS Teams. I sent a message to Stephane asking if he can have a look to your question
Upvotes: 1