简体   繁体   中英

Add Azure AD Authentication in the exiting applicaiton

I have one existing ASP.Net Webform application currently on production that needs to integrated with many Authentication provider now. Like Azure AD, SaleForce etc.

At the time of login, I needs to provide option to user against which AZure AD account user need to Authenticate. There would be multiple AzureAD account.

I don't want user to redirect on Azure portal for authentication.

I want to create the method in like my application which will take username, password, AzureADConfiguration and return true/false based on credentials.

bool ValidateUser(string userName, string password, object AzureAdRequiredConfiguration)

Please let me know if it possible thought some nuget package.

Thanks In Advance.

I don't want user to redirect on Azure portal for authentication.

Why not? With a basic or premium subscription of Azure AD you can brand the logon page.

Even though you can use the resource owner password credentials flow against Azure AD to exchange username and password for an access token, you really shouldn't do that.

Your application should avoid handling passwords when possible. It prevents your users from using features like multi-factor authentication and/or federation.

While I agree with MvdD, that using resource owner password credentials flow is not ideal it does have some very specific uses especially if your application/organization is the owner of user's credentials.

You can use ADAL.NET for this purpose. Take a look at this article posted by Vittorio Using ADAL to Authenticate using Username/Password

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM