Azure Active Directory在注销时跳过帐户选择 [英] Azure Active Directory skip account selection on logout
问题描述
我有一个连接到Azure Active Directory的ASP.Net Core应用程序.登录效果很好,但是退出时我希望它立即发生而不必通过Azure AD中的选择帐户"屏幕.
I have an ASP.Net Core application that connects to Azure Active Directory. The sign-on works great, but when signing out I want it to happen immediately without having to go through the "Pick an Account" screen in Azure AD.
我已经使用了示例应用程序( https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2 ),并修改了启动方法:
I've used the sample app (https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2) and modified the startup method:
services.Configure<OpenIdConnectOptions>(AzureADDefaults.OpenIdScheme, options =>
{
options.Authority = options.Authority + "/v2.0/";
options.SaveTokens = true;
}
我读到SaveTokens应该导致在注销时设置id_token_hint(假设这将绕过注销屏幕),但这没有发生.
I read that SaveTokens should cause id_token_hint to be set on logout (assuming this will bypass the logout screen) but that's not happening.
如何使应用程序立即注销而不转到Azure的注销屏幕?
How do I make the application sign out immediately and not go to Azure's logout screen?
推荐答案
It turns out this behavior is no longer possible with the v2 endpoint: https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/issues/126
这篇关于Azure Active Directory在注销时跳过帐户选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!