Skip to content

Instantly share code, notes, and snippets.

@saltukalakus
Last active June 2, 2025 20:34
Show Gist options
  • Save saltukalakus/210685aab42bae0151c687d704af5eae to your computer and use it in GitHub Desktop.
Save saltukalakus/210685aab42bae0151c687d704af5eae to your computer and use it in GitHub Desktop.
How to insert AssertionConsumerServiceURL (ACS) in AuthN when Auth0 is the SAML service provider. (a.k.a. SAML enterprise connection)
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
@@AssertServiceURLAndDestination@@
AssertionConsumerServiceURL="https://demo-saml-sp.auth0.com/login/callback"
ID="@@ID@@"
IssueInstant="@@IssueInstant@@"
ProtocolBinding="@@ProtocolBinding@@" Version="2.0">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">@@Issuer@@</saml:Issuer>
</samlp:AuthnRequest>
@nicosabena
Copy link

You can also replace @@AssertServiceURLAndDestination@@ with two separate template variables @Destination and @AssertionConsumerServiceURL so that you don't hardcode any value:

<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
    Destination="@@Destination@@"
    AssertionConsumerServiceURL="@@AssertionConsumerServiceURL@@"
    ID="@@ID@@"
    IssueInstant="@@IssueInstant@@"
    ProtocolBinding="@@ProtocolBinding@@" Version="2.0">
    <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">@@Issuer@@</saml:Issuer>
</samlp:AuthnRequest>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment