【问题标题】:Azure Active Tenant Federation MetadataAzure 活动租户联合元数据
【发布时间】:2016-02-28 20:20:11
【问题描述】:

我得到了 azure AD url,如下所示,

login.windows.net/7229xd0-5227-41c8-8459-c0819kj6718/FederationMetadata/2007-06/FederationMetadata.xml

我的网络配置文件:

这是我的startup.Auth页面

公共部分类启动 {

    private static string clientId = ConfigurationManager.AppSettings["ida:ClientId"];
    private static string aadInstance = ConfigurationManager.AppSettings["ida:AADInstance"];
    private static string tenant = ConfigurationManager.AppSettings["ida:Tenant"];
    private static string postLogoutRedirectUri = ConfigurationManager.AppSettings["ida:PostLogoutRedirectUri"];

    string authority = String.Format(CultureInfo.InvariantCulture, aadInstance, tenant);

    public void ConfigureAuth(IAppBuilder app)
    {
        app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);

        app.UseCookieAuthentication(new CookieAuthenticationOptions());

        app.UseOpenIdConnectAuthentication(
            new OpenIdConnectAuthenticationOptions
            {
                ClientId = clientId,
                Authority = authority,
                PostLogoutRedirectUri = postLogoutRedirectUri,
                Notifications = new OpenIdConnectAuthenticationNotifications
                {
                    AuthenticationFailed = context => 
                    {
                        context.HandleResponse();
                        context.Response.Redirect("/Error?message=" + context.Exception.Message);
                        return Task.FromResult(0);
                    }
                }
            });
    }
}

但我收到错误页面View Image

【问题讨论】:

    标签: azure active-directory multi-tenant


    【解决方案1】:

    您的标识符为 632485c9- 的应用程序似乎没有被映射为使用您尝试连接的 AD。

    请访问 portal.azure.com,然后导航到目录并确保您正在使用的应用已映射到 AD,并且可以验证用户映射。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-22
      相关资源
      最近更新 更多