How to show "Login with SAML" button on our own site for fusionauth application that has sso?
-
How do we retrieve whether an application supports logging in with external idp using the fusionauth api? i.e: sso.
We have dedicated login pages on our site oursite.com for each company, and on each of these, there may or may not be a "Login with your external idp" button.
How do we retrieve this information from the fusionauth api? -
Hiya,
The information about whether an application has an IdP configured for it is stored on the identity provider object, not on the application.
So the easiest way to answer your question is to retrieve all the identity providers (or one, if you have a target), then filter through the JSON looking for your application id.
https://fusionauth.io/docs/v1/tech/apis/identity-providers/#retrieve-all-identity-providers shows how to list all Identity Providers.
If you look at the results, you'll see a field similar to:
"applicationConfiguration": { "1c212e59-0d0e-6b1a-ad48-f4f92793be32": { "createRegistration": true, "enabled": true } },
for each of the identity providers.
The
applicationConfiguration
has keys, each of which is an application Id.Does that help?