4
votes

I am looking to see how I can integrate authentication to a bot using Azure AD. There is a nifty code Microsoft offered in this article about authentication with azure bot. What it does is offer a sign in option to users, they log in and authenticate by copy/pasting the 6 magic numbers back to the chat. I used AADv1 example to test it in Teams.

Here is the direct github link to the cs file where the GetTokenDialog is (line 95): github link

However I am having trouble finding a way that it automatically authenticates the user in Microsoft Teams since we use SSO within corporate network.

The picture in this link,Microsoft Teams bot picture, is from a Who bot that you can download to Teams and talk to it. It basically does the authentication automatically after the user initially clicks "Allow".

Is there a way to replicate this process?

1

1 Answers

1
votes

I think this can inform you.

botframework on teams channel 1:1 Authentication AAD integrated

At this time it's can't possible to SSO your bot on teams channel but you can compare the tenantId of your AAD.

Note of response (Adrian Solis) : Currently, there's no way to get the user's AAD token automatically-- you have to get the user to go through a login experience (as described in the documentation links you posted above) to get an AAD id or access token.