# Configure SAML callback URL

**URL:** <https://community.auth0.com/t/configure-saml-callback-url/129710>\
**Category:** Get Help\
**Tags:** connections, saml-enterprise-connection\
**Created:** [March 14, 2024, 3:39pm UTC](https://community.auth0.com/t/configure-saml-callback-url/129710 "2024-03-14T15:39:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrosen-cc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jrosen-cc/32/52434_2.png) [@jrosen-cc](https://community.auth0.com/u/jrosen-cc)\
**Post date:** [March 14, 2024, 3:39pm UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/1 "2024-03-14T15:39:16Z")

</div>

The [Connect Your App to SAML Identity Providers docs](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/saml) say

> Add an **Allowed Callback URL** of **`{https://yourApp/callback}`**

Is this configurable for SAML? Our application uses the [auth0-nextjs library](https://github.com/auth0/nextjs-auth0), which uses `/api/auth/callback` as the path.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 14, 2024, 7:28pm UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/3 "2024-03-14T19:28:44Z")

</div>

Hi @jrosen-cc,

The documentation provides a generalized example, like setting the callback URL to `http://localhost:3000`.

In this case, you can continue using your `/api/auth/callback` path as the callback URL of your app. For example: `http://localhost:3000/api/auth/callback`.

Then, you will want to configure your SAML connection on the [_Dashboard \> Authentication \> Enterprise \> SAML_](https://manage.auth0.com/#/connections/enterprise/samlp).

Let me know how this goes for you.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![jrosen-cc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jrosen-cc/32/52434_2.png) [@jrosen-cc](https://community.auth0.com/u/jrosen-cc)\
**Post date:** [March 14, 2024, 8:16pm UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/4 "2024-03-14T20:16:57Z")

</div>

The new-SAML-configuration form has the following fields:

- Connection name
- Sign In URL (placeholder: `https://samlp.example.com/login`)
- X509 Signing Certificate
- Enable Sign Out
- Sign Out URL (placeholder: `https://samlp.example.com/logout`)
- User ID Attribute (placeholder: `http://schemas.xmlsoap.org/2005/05/identity/claims/nameidentifier`)
- Debug Mode
- Sign Request
- Sign Request Algorithm
- Sign Request Algorithm Digest
- Protocol Binding
- Request Template

None of these suggest to me where I put `http://localhost:3000/api/auth/callback`

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 15, 2024, 4:45pm UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/5 "2024-03-15T16:45:50Z")

</div>

Hi @jrosen-cc,

Thanks for the reply.

Yes, that’s correct. Those settings are for the SAML Enterprise _connection_.

To set the callback URL for your _application_, you will need to go to the [_Dashboard \> Applications \> Applications \> Your Application \> Allowed Callback URLs_](https://manage.auth0.com/#/applications).

Don’t forget to save your changes at the bottom!

Cheers,  
Rueben

---

<div class="post-metadata">

**Author:** ![jrosen-cc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jrosen-cc/32/52434_2.png) [@jrosen-cc](https://community.auth0.com/u/jrosen-cc)\
**Post date:** [March 15, 2024, 5:14pm UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/6 "2024-03-15T17:14:32Z")

</div>

We already have several allowed callback URLs configured for the application:

```auto
https://production.example.com/api/auth/callback
https://*.staging.example.com/api/auth/callback
http://localhost:3000/api/auth/callback

```

What I’m unclear about is how the SAML connection knows which of those to use.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 15, 2024, 7:00pm UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/7 "2024-03-15T19:00:20Z")

</div>

Hi @jrosen-cc,

Great! Then you should be all set here.

When you authenticate on your application, your application will specify a `redirect_uri` in the request.

This `redirect_uri` value should match one of the allowed callback URLs. And that’s how your application knows to redirect to the callback URL after the authentication completes, regardless of your connection.

---

<div class="post-metadata">

**Author:** ![jrosen-cc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jrosen-cc/32/52434_2.png) [@jrosen-cc](https://community.auth0.com/u/jrosen-cc)\
**Post date:** [March 15, 2024, 10:54pm UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/8 "2024-03-15T22:54:45Z")

</div>

> When you authenticate on your application, your application will specify a `redirect_uri` in the request.

That’s the piece I was missing. The SAML document made it sound like that value was fixed for SAML integrations, rather than provided at runtime by the client application.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 19, 2024, 12:09am UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/9 "2024-03-19T00:09:30Z")

</div>

Hi @jrosen-cc,

Ah, yes, I agree that the documentation is slightly misleading with how was worded.

I’ll pass your feedback on to our docs team so they can revise that section.

If there is anything else you need help with, please feel free to reach out.

Cheers,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 2, 2024, 12:10am UTC](https://community.auth0.com/t/configure-saml-callback-url/129710/10 "2024-04-02T00:10:10Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
