I am currently evaluating the ASP.NET Core library using the AddSaml() Authentication.
I am unable to change the AssertionConsumerServiceUrl value in the configuration of LocalServiceProviderConfiguration.
If I use the url that ends with SAML/AssertionConsumerService then I have no problems and am able to receive SSO responses and can login via SP initiated and via IDP initiated.
But if I change any part of the url to something else, such as samlauth/acs then I receive a 404 not found error when redirecting back from my idp.
Is the SAML/AssertionConsumerService the only url I can use or can I choose any url and the default saml handler will receive the response? It seems that if I use another url, I will have to wire up a controller to handle that?
Thanks
If you’re using the SAML authentication handler (ie services.AddAuthentication().AddSaml()), the default path to receive SAML responses is /SAML/AssertionConsumerService.
However, you can specify a different path through the SAML authentication handler options.
For example:
services.AddAuthentication().AddSaml(options =>
{
options.AssertionConsumerServicePath = “/samlauth/acs”;
});
You’ll also need to update the AssertionConsumerServiceUrl in your appsettings.json SAML configuration.
Yes that was it. Once I set the AssertionConsumerServicePath in the options, the new url started working. I knew I was something simple that I was missing like a piece of configuration somewhere.
Thank you very much.
You’re welcome.