Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

IdSrv3 and ADFS2.0 ws-fed #3342

Closed
Lalithkx opened this issue Oct 31, 2016 · 7 comments
Closed

IdSrv3 and ADFS2.0 ws-fed #3342

Lalithkx opened this issue Oct 31, 2016 · 7 comments
Labels

Comments

@Lalithkx
Copy link

When I use external authentication with IdSrv3 and ADFS2.0/ws-fed, I get the following message

{"Message":"The requested resource does not support http method 'POST'."}.

Is it because POST is still not supported (Issue #3168)?

I am using idSrv3 v2.5.0.

Thanks

@leastprivilege
Copy link
Member

@Lalithkx
Copy link
Author

Lalithkx commented Nov 1, 2016

Thanks for the advise. I was trying to run the WS-Fed example in Client Samples as well as trying to run MVC AUthentication against sample host with app.UseWsFederationAuthentication. After logging into the ADFS I get the above Post not supported error. I will look into the actual source test code.

@Lalithkx
Copy link
Author

Lalithkx commented Nov 1, 2016

I am configuring my Startup.cs exactly as mentioned in the IdentityServerExtension.cs. I tried several clients with it, but all of them get the same error as I mentioned above. The ADFS WS-Federation end point binding is POST and I cannot change it. Do we have to do something on the host to handle that Post callback or is the IdentityServer3 is supposed to handle it and forward it to the client? The Client is connecting using the OpenId configuration to IdentitySrv host. Currently the WS-Federation end point is pointed to https:// Identitysrv/core. If I change it to the Client/SignInCallback (HttpPost), I get token and state values of null.

Any help will be greatly appreciated. Unfortunately we had IDSrv4 based system working fully but our IT decided to forgo the upgrade of AD servers to support OAuth2.

Thanks

@Lalithkx
Copy link
Author

Lalithkx commented Nov 1, 2016

Got this working. Looks like the most important aspect is to set SignInAsAuthenticationType = signInAsType, i.e, let the Identity server set the SignInAsAuthenticationType.

@leastprivilege
Copy link
Member

Yes - correct configuration is necessary ;)

@brianwagg
Copy link

I've gone through all this stuff, but I'm not seeing the piece that enables the POST to work. Is the SyncConfigurationManager shown in the link above required and/or does that handle it??

I am authenticating with ADFS properly, but the post back to the /identity/wsfed endpoint throws the error.
Any suggestions or thoughts?
I'm using IdentityServer3 v2.5.0 currently.

Any help would be greatly appreciated.

var metadataAddress = "https://someAdFsUrl/federationmetadata/2007-06/federationmetadata.xml";

        app.UseWsFederationAuthentication(
            new WsFederationAuthenticationOptions
            {
                Wtrealm = "https://localhost/app/ADFSTest/identity",
                AuthenticationType = "adfs",
                Caption = "ADFS",
                MetadataAddress = metadataAddress,
                SignInAsAuthenticationType = signInAsType,
                CallbackPath = new Microsoft.Owin.PathString("/identity/wsfed")
            });

@codyskidmore
Copy link

codyskidmore commented May 19, 2017

@brianwagg

I ran into the same error. The IdP CallbackPath uses the URL, "https://examle.com/idp/core/adfs". We install our applications in a root folder under IIS where the website points at the root folder. Then we add the IdP as an application under the root folder, so the URL looks like, "https://example.com/idp/core".

To get the CallbackPath working, I set the callback path to, "/idp/core/adfs". Then I updated the external provider's POST binding to point to the same URL. In this case, the external provider is ADFS 3.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants