【问题标题】:Azure Active Directory Sign out ErrorAzure Active Directory 注销错误
【发布时间】:2015-04-03 03:36:49
【问题描述】:

我从 Visual Studio 2013 创建了一个通用网站,并成功地将其连接到现有的 Azure Active Directory 实例以进行身份​​验证。我可以使用适当的凭据以 Azure AD 中的任何用户身份登录。不幸的是,我无法在没有收到此错误的情况下退出:

AADSTS50068:注销失败。启动应用程序不是 当前会话的参与者。

我已经用谷歌搜索了错误号,但显然我是第一个遇到此问题的人....:) 我很确定我不是,但我现在不知道为什么登录有效,但退出无效。

这是退出代码,与生成的代码几乎完全相同:

public ActionResult SignOut()
        {
            WsFederationConfiguration config = FederatedAuthentication.FederationConfiguration.WsFederationConfiguration;

            // Redirect to SignOutCallback after signing out.
            string callbackUrl = Url.Action("SignOutCallback", "Account", routeValues: null, protocol: Request.Url.Scheme);

            SignOutRequestMessage signoutMessage = new SignOutRequestMessage(new Uri(config.Issuer), callbackUrl);
            signoutMessage.SetParameter("wtrealm", IdentityConfig.Realm ?? config.Realm);
            string signoutMsg = signoutMessage.WriteQueryString();

            FederatedAuthentication.SessionAuthenticationModule.SignOut();      

            return new RedirectResult(signoutMsg);
        }

【问题讨论】:

  • George,如果您仍然看到此错误 - 请给我提供错误场景的提琴手跟踪信息吗?谢谢
  • 感谢您的回复。我已经删除了应用程序并重新创建了示例,这次注销按预期工作。我应该考虑为此添加一个提琴手跟踪文件。下次我遇到类似的问题时,我一定会捕获跟踪。
  • @gmasselli 请帮帮我,我遇到了同样的问题(vs2013,天蓝色的网络应用程序,天蓝色的活动目录,同样的错误消息)。我已经删除并重新创建了十几次,没有任何效果!请帮帮我:)

标签: asp.net-mvc azure-active-directory


【解决方案1】:

在删除 Azure 中的网站和 Microsoft OAuth (https://account.live.com/developers/applications/) 的相关 live.com 注册后,我重新创建了示例并按预期注销。我很确定我使用无效的“重定向 URL”(http 与 https)错误地注册了应用程序。

【讨论】:

    猜你喜欢
    • 2019-02-23
    • 2023-03-07
    • 2021-06-26
    • 2015-11-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-26
    相关资源
    最近更新 更多