Hi @Niket Kumar Singh !
I took a look at this problem and here is what I've found.
In short, if you're using Sustainsys.Saml2 v3, you can confidently use custom ACS endpoints by setting SPOptions.ModulePath. Make sure your IdP is configured with the exact URL and your app is listening on the correct path. I've tested this solution, and it worked fine.
Problem:
Previously, in v1 and v2 of Sustainsys.Saml2, the ACS path was hardcoded as /Saml2/Acs, making it difficult to change the endpoint to match custom requirements (such as /api/saml/acs). This was a limitation for many users integrating with Azure AD (Microsoft Entra) or other IdPs.
Update:
As confirmed in GitHub Issue #1434, v3 of Sustainsys.Saml2 introduces more flexibility, allowing you to change the ACS endpoint by setting the SPOptions.ModulePath property. This means you can now use custom paths like /api/saml/acs for your ACS endpoint.
After configuring SPOptions.ModulePath to a custom value in my own test project, and updating the Reply URL in Microsoft Entra to match, the authentication flow worked (my version is 2.11.0) :
- The SAML response POSTed to my custom ACS endpoint (
/api/saml/acs) - The application processed the response and authenticated the user as expected
- The network trace showed a successful POST and redirect (HTTP 303) at the endpoint
If you need any help, please keep me updated on this.