How can I authenticate my existing users through my bot?

I am creating a bot that will allow users to interact with an existing web service. I want users to be able to start a conversation with my bot and get information personalized for them.

How do I map a bot user to an existing account? Not all channels use an email address, so I cannot use this for matching.

I thought about linking the link in the chat window, which said something like "you need to register in the bot structure before continuing," and provide a link to my service containing the global UserId Bot Framework. Then I can save this identifier in my existing service database and use it to authenticate the user.

Is there a better way to do this? Should bots be considered standalone applications?

+8
botframework
source share
2 answers

If you need to identify the user, you can simply ask them to identify the information.

If you need to authenticate, we usually recommend sending a link that performs the authentication flow and then storing the access token in UserBotData so that you have this for future messages.

+5
source share

You can take a look at the Facebook Auth sample to get an idea of ​​the potential Auth script flow. For Azure AD, you need to execute a similar thread.

In addition, in this thread, we discussed how to do this with Azure AD.

Update

There are two new patterns that you might want to take a look at, as they implement the workflow in question.

0
source share

All Articles