# Setup Keycloak as SP and Salesforce as IDP. SAML Request and response are successful, however it's going into an infinite loop for authentication

**URL:** <https://forum.keycloak.org/t/setup-keycloak-as-sp-and-salesforce-as-idp-saml-request-and-response-are-successful-however-its-going-into-an-infinite-loop-for-authentication/184>\
**Category:** Securing applications\
**Created:** [October 21, 2019, 2:11pm UTC](https://forum.keycloak.org/t/setup-keycloak-as-sp-and-salesforce-as-idp-saml-request-and-response-are-successful-however-its-going-into-an-infinite-loop-for-authentication/184 "2019-10-21T14:11:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sri1002](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@sri1002](https://forum.keycloak.org/u/sri1002)\
**Post date:** [October 21, 2019, 2:11pm UTC](https://forum.keycloak.org/t/setup-keycloak-as-sp-and-salesforce-as-idp-saml-request-and-response-are-successful-however-its-going-into-an-infinite-loop-for-authentication/184/1 "2019-10-21T14:11:00Z")

</div>

Environment JBoss EAP 7.2.0.Beta (WildFly Core 5.0.5.Final-redhat-00001) with Keycloak 7,0

I’ve setup Keycloak as SP and Salesforce as IDP. SAML Request and response are successful, however it’s going into an infinite loop for authentication.

Here are the detailed logs. I see the message repeatedly that Session is expired on some other node - Please help me understand and resolve the issue.

2019-10-07 02:08:19,063 DEBUG [org.keycloak.adapters.saml.SamlSessionStore] (default task-1) Session p65xTS3xjPTvpROjT0Ad8c0Yfj\_TBv2i0u\_MrBbL has expired on some other node

---

<div class="post-metadata">

**Author:** ![ba-amit](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@ba-amit](https://forum.keycloak.org/u/ba-amit)\
**Post date:** [December 24, 2020, 8:56pm UTC](https://forum.keycloak.org/t/setup-keycloak-as-sp-and-salesforce-as-idp-saml-request-and-response-are-successful-however-its-going-into-an-infinite-loop-for-authentication/184/2 "2020-12-24T20:56:49Z")

</div>

@sri1002 how did you set this entire thing up, any guided explanation would be highly appreciated.
