SAML brokering: Authenticate without using Keycloak UI

Hello, I’m new to Keycloak,
I have my own front-end and I don’t need to use Keycloak’s UI.
I can log in as a local user simply by calling Keycloak’s /token endpoint, great!
But now I configured Keycloak as an Identity broker and need to authenticate external users via SAML.
If I go to Keylcoak UI and choose SAML, I get redirected, I log in, and everything works fine.
But can I achieve the same from my own front-end, without using Keycloak UI?
Are there some rest endpoints for this? What is the best practice in such a case?
Thanks!

@widehusk I’m fairly new to keycloak as well. I believe the scenario you are looking for is to setup a redirect in keycloak? Authentication > “Identity Provider Redirector” > Actions > Config. Then enter the id of your IDP you created for keycloak. Alias can be whatever. This is what i saw last week: Keycloak Configuring the Default Identity Provider Redirection - YouTube. Can i ask you what you are using for an IDP for saml? I’m stuck setting it up with adfs as when i click the saml button it doesn’t redirect at all

1 Like

Hi @jkosano, thanks for the suggestion, I’ll check it out!
For testing purposes, I set up another instance of Keycloak as an IDP.
I used this as a guide: Keycloak SAML SSO (SP & IdP Integration) - YouTube