Legacy Knowledge Base
Published Jun. 30, 2025

Getting 'DuplicateSamlIdpSsoSessionException' in the Debug Logs

Written By

Madhusudan Sharma

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

Users are facing intermittent login issues in the SAML environment; however, the below error is observed frequently in their log files:

DEBUG [default task-73687][BaseSamlStrutsAction:61] null
com.liferay.saml.persistence.exception.DuplicateSamlIdpSsoSessionException: Duplicate SAML IDP SSO session for 

Environment

  • Liferay DXP 7.4

Resolution

Following are the suggestions that might help to resolve this issue:

  • In general, the SSO process identifies a SAML SSO request and so the session for that portal process is created as a brand new one.
  • However, if there is an already existing session on the portal side then that might result in this  error. Please note that the Liferay portal handles a SAML SSO request and its session as a new one if there is no value of the SAML_SSO_SESSION_ID in the request.
  • The other cause for this can be inconsistency in entity ID generation on the DB level.
  • In order to confirm the inconsistency in entity ID generation, check if the value of the currentId field in the Counter DB table for the entry whose name is com.liferay.saml.persistence.model.SamlIdpSsoSession is higher than the highest value of the samlIdpSsoSessionId in the SamlIdpSsoSession DB table.
  • The SamlIdpSsoSession creation logic uses this currentId value to generate the value for the samlIdpSsoSessionId for the new SamlIdpSsoSession entity.
  • If the currentId value is lower then it should be set higher than the the highest value of the samlIdpSsoSessionId in the SamlIdpSsoSession DB table.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base