我需要在我们现有的Azure MVC网站项目中添加ASP.NET active directory身份验证,但我需要使用表单身份验证方法。
我完成了本教程中的所有步骤:https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-asp-webapp
但由于某种原因,没有重定向到AD登录页面,搜索解决方案a请查看此内容:IAuthenticationManager.Challenge not calling ExternalLoginCallback
将身份验证模式设置为none并添加标记解决了重定向问题,但删除了以前的表单身份验证。
有没有办法在同一项目中使用表单身份验证和Azure AD?
发布于 2021-11-05 12:11:41
安装此软件包: Microsoft.AspNetCore.Authentication.AzureAD.UI的
`services.AddDefaultIdentity() .AddEntityFrameworkStores();services.AddAuthentication(sharedOptions => }).AddAzureAD(options => Configuration.Bind("AzureAd",sharedOptions
实例更新实例“appsettings.json”:{ "AzureAd":"https://login.microsoftonline.com/",
"CookieSchemeName":"Identity.External“},
阅读有关here的更多信息。用于Azure AD authentication。
https://stackoverflow.com/questions/69834719
复制相似问题