An internal error has occurred - "Could not process response from SAML identity provider"

I am trying to set up an ADFS identity provider based upon this blog post.

Finally, I manage to log on at ADFS, but after redirecting to Keycloak, I see a page with

“An internal error has occurred”

message. In the server logs I see:

ERROR [] (default task-1) Uncaught server error: Could not process response from SAML identity provider.

The SAML response itself doesn’t look too broken. How can I debug this problem?

Did you get this resolved? I´m facing the same issue.

The problem was that attempts to log on at ADFM portal not initiated by service provider, resulted in Keycloak not being able to decide what to do (thus the reported error).

Finally, I managed to set up ADFS identity provider at Keycloak and managed to make SSO work on Drupal.