天蓝色广告 |使用其他 Azure 帐户登录时发生冲突

Azure AD | Conflict when logged in with another Azure Account

我有一个 Asp.net MVC 应用程序,它使用 Azure AD 和 OpenID Connect OWIN 中间件来处理身份验证。一切正常,除了一件事:如果用户已经登录另一个 Microsoft 应用程序,可以说是 Office 365 帐户或实时邮件帐户,当尝试登录时,它会收到一个页面,说明不允许登录我的应用程序,这是正确的,但我需要如何在我的代码中捕捉到这种情况,以允许用户使用不同的帐户登录。有办法吗?这是设计使然?我的意思是:用户当时只能使用 live/azure 帐户登录?我找不到任何关于此的文档。

从今天开始,通常一次只有一个用户,但我们很快就会为您提供一种方法来 select 特定用户,而不是自动让您使用最近的用户登录。 今天解决此问题的一种方法是在登录请求中注入参数 "prompt=login"。您可以在 RedirectToIdentityProvider 通知中执行此操作,类似于 http://www.cloudidentity.com/blog/2014/11/17/skipping-the-home-realm-discovery-page-in-azure-ad/ for domain_hint. This will cause the sign in experience to always start with a fresh prompt even if the user is already signed in. The draw back is that you'll never get SSO this way. Hopefully our account switiching feature will become available soon, keep an eye on http://blogs.technet.com/b/ad/ 公告

中显示的内容