0
votes

Could you help me to implement login functionality to my web application (OAuth)? I created MS teams bot and need to connect to my web service. I need to call (from the bot) my login web page (Login page: user & pass), get token and then use (refresh if needed) the token to make API requests (from bot) to my service. Examples, architecture, suggestions?

Thank you ...

How to authenticate a user using a teams bot using my own custom authentication service?

https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/46.teams-auth

I found some solution and ... Any different suggestions? Also ... A question ... How can I override the existing dialog (the example) and use my content (new dialog body)?

1

1 Answers

2
votes

You can take a look at Adding Authentication to your Teams Bot. Invoke activity is send to the Bot when user to click on oAuthPrompt Dialog. We have TeamsAuth sample code using the same oAuthPrompt dialog, You can set the oAuth setting for your Bot in Azure and test it. For more information how Authentication flow works in Teams Bot you can check the MS Teams Authentication flow in Bots, Bot uses the Dialog from TeamsActivityHandler class, You can create your own dialog using the same.