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:
-
Is there a dedicated Management API endpoint (e.g. something like POST /connections/{id}/test) that replicates the dashboard’s “Test Connection” behavior?
-
If not, what is the recommended approach for programmatic pre-flight validation of a connection before creation?
-
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.
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