# SAML connection creation and testing - auth0 as SP

**URL:** <https://community.auth0.com/t/saml-connection-creation-and-testing-auth0-as-sp/198759>\
**Category:** Get Help\
**Tags:** connections, saml-enterprise-connection\
**Created:** [April 8, 2026, 9:34am UTC](https://community.auth0.com/t/saml-connection-creation-and-testing-auth0-as-sp/198759 "2026-04-08T09:34:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vignesh.ramalingam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vignesh.ramalingam/32/71784_2.png) [@vignesh.ramalingam](https://community.auth0.com/u/vignesh.ramalingam)\
**Post date:** [April 8, 2026, 9:34am UTC](https://community.auth0.com/t/saml-connection-creation-and-testing-auth0-as-sp/198759/1 "2026-04-08T09:34:25Z")

</div>

Hi Auth0 community,

I’m building a workflow that needs to programmatically validate a connection’s configuration _before_ actually creating it. In the Auth0 dashboard, there’s a “Test Connection” button that lets you verify things are working — but I haven’t been able to find an equivalent endpoint in the Management API.

**What I’m trying to do:** Before calling `POST /connections`, I want to validate that the connection attributes and required fields meet the expected schema, and ideally verify the connection is reachable — similar to what the dashboard’s test button does under the hood.

**My questions:**

1. Is there a dedicated Management API endpoint (e.g. something like `POST /connections/{id}/test`) that replicates the dashboard’s “Test Connection” behavior?

2. If not, what is the recommended approach for programmatic pre-flight validation of a connection before creation?

3. Does the dashboard’s test button use the same Management API internally, or is it backed by a separate internal service not exposed publicly?

What i have did so far:

- used authorize call with the connection name → not effective, cannot track all the error message.
- The ACS url and entity ID was created from a local service and tried to proxy auth0 but getting issue on discovery endpoint mismatch. or signature failure. not working as expected.

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [April 10, 2026, 8:51pm UTC](https://community.auth0.com/t/saml-connection-creation-and-testing-auth0-as-sp/198759/3 "2026-04-10T20:51:17Z")

</div>

Hi @vignesh.ramalingam

Unfortunately, there is no dedicated Management API endpoint for pre-flight connection validation, and the Dashboard’s “Test Connection” button does not validate before creation because the button actually relies on the connection already existing in the database. It simply initiates a standard `/authorize` flow using a hidden Auth0-internal application.

Instead of trying to test _before_ creation, you can try to create the connection via `POST /api/v2/connections` , but do not enable it for your production application . Only enable it for a dedicated “Test Application” Client ID. This ensures real users cannot see or interact with the unverified connection.

You will need to trigger your `/authorize` flow specifically requesting that connection and using your Test Application’s Client ID. Regarding not being able to track the errors, you must programmatically query the **Auth0 Management API Logs endpoint** (`GET /api/v2/logs` ) immediately after the `/authorize` attempt fails using `q=type:f AND connection:"YOUR_NEW_CONNECTION_NAME"` which will contain a highly detailed `description` and `details` object explaining exactly _why_ the SAML exchange failed.

If the `/authorize` succeeds, your workflow can call `PATCH /api/v2/connections/{id}` to enable the connection for your production applications. If it fails, you can parse the exact error from the Logs API and immediately call `DELETE /api/v2/connections/{id}` to clean up the failed attempt.

If you have any other questions, let me know!

Kind Regards,  
Nik

---

<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 24, 2026, 8:51pm UTC](https://community.auth0.com/t/saml-connection-creation-and-testing-auth0-as-sp/198759/4 "2026-04-24T20:51:32Z")

</div>

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