Test SAML connection configuration programmatically
Last Updated:
Overview
I was able to do this successfully by creating a new SAML enterprise account in Auth0 and associating it with the Auth0 application by using Auth0 SDK / Rest endpoints.
However, once the SAML connection is creation in Auth0, I could not find any proper API which allow me to programmatically test whether the SAML connection is properly configured or not.
Also, I can see from the Auth0 UI this is possible. Once you go into the SAML connections and click on 'Test' it shows as "It Works" in a new page. How can we do the same thing programmatically through Auth0 Rest Endpoints ?
Applies To
- SAML
Cause
Solution
https://<your_tenant_domain>/authorize?client_id=<your_all_applications_client_id>&response_type=code&connection=<SAML_connection_name>&prompt=login&scope=openid%20profile&redirect_uri=https://manage.auth0.com/tester/callback?connection=<SAML_connection_name>;
The redirect URI brings the response back to your tenant dashboard where it is evaluated to show if it was successful or not.
So to summarise, the only way to test a SAML configuration is to attempt a login in a browser, using a valid user account for the SAML IdP and check for errors or a successful login.