Search code examples
azure.net-coreazure-active-directorybotframeworkazure-cognitive-services

Any other ways to login users in bot besides using sigin in cards?


I have gone through this doc:

https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0

I can understand we can sign in users using sign in cards.

But is there any other ways to do that to sign in azure ad users instead of using bot internal login process?

I am using azure web chat client and .net core to code my bot. Any assistance is appreciated.


Solution

  • If you use a custom WebChat channel, you can auth users first on the web page and then use tokens based on your bot business logic. For details, you can refer to this demo.

    What's more, though it is not recommended, Azure AD ROPC flow will work for all channels by Azure AD rest API or Azure AD SDK to auth users. As you need to require your users to input their username and passwords in this flow while your bot interacting with users, which will carry risks are not present in other flows. You should only use this flow when other more secure flows can't be used.

    Hope it helps.