无法使用WS-Federation SSO登录到AzureAD

我有用于使用ADFS登录的旧代码,但现在对通过AzureAD登录具有其他要求。联合身份验证库中的方法可以与ADFS一起使用,但不适用于Azure AD。

    public static void RedirectToIdentityProvider(string db_,string realmIdentifier_,Federationconfig config_)
    {
        try
        {
            var returnurl = "http://localhost/6420";

            FederationDatabaseFunctions db = new FederationDatabaseFunctions(db_);
            FederationData federationData = db.GetFederatedDataByRealm(realmIdentifier_);
            TrustedIssuerFederationmetadata metadata = new TrustedIssuerFederationmetadata(federationData);


            WSFederationAuthenticationmodule wsFAM = new WSFederationAuthenticationmodule();

            wsFAM.PassiveRedirectEnabled = true;
            wsFAM.RequireHttps = true;
            wsFAM.PersistentCookiesOnPassiveRedirects = false;
            wsFAM.Issuer = "https://sts.windows.net/27010d87-5b00-4131-b6fd-fde8346ce198/";
            wsFAM.Realm = "https://login.microsoftonline.com/";

            wsFAM.RedirectToIdentityProvider(returnurl,returnurl,false);
        }
        catch { throw; }

    }

我收到404错误,但发行人绝对正确。是否有其他要传递给AzureAD的参数。

注意:我已经设法通过OWIN启动在单独的MVC项目中登录AzureAD,但如果可能的话,理想情况下,我需要使用现有设置进行复制。

这是提供404的网址:这是我返回的网址:Go toolchain

WMK159687624801314 回答:无法使用WS-Federation SSO登录到AzureAD

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3160125.html

大家都在问