Legacy Knowledge Base
Published Jun. 30, 2025

Screen name must not be duplicate but is already used by user SAML Error

Written By

Ricardo Couso

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

  • Some users can't log into Liferay via SAML when Liferay acts as Service Provider.
  • There's an error in the logs about a duplicate screen name:
    2023-11-30 18:04:53.521 ERROR [ajp-nio-127.0.0.1-8009-exec-2][WebSsoProfileImpl:809] Screen name 12345 must not be duplicate but is already used by user 67890

Environment

  • Liferay DXP 7.3, 7.4, Quarterly Release 2023.Q3, 2023.Q4

Resolution

  • This error happens when the user trying to login is recognized by the SAML Identity Provider but Liferay itself cannot find it in its system using the identifier in the SAML response.
  • This prompts Liferay to try to create the user with the attributes in the same SAML response. 
  • Then, if:
    • the attribute for screenName in the response is already taken by another existing user and
    • the property users.screen.name.always.autogenerate is false (default value),
    there's a clash of screen names and the error is thrown.
  • To solve this issue:
    • review the attribute mappings in your SAML configuration in Liferay;
    • review the attributes in the SAML response emitted by the Identity Provider;
    • review the possibility of using Screen Name as the Name Identifier Format.

Additional Information

  • When analyzing issues during SAML operations it can be useful to activate the following DEBUG traces:
    • com.liferay.saml.opensaml.integration.internal.resolver.DefaultUserResolver
    • com.liferay.saml.opensaml.integration.internal.servlet.profile.WebSsoProfileImpl
    • com.liferay.saml.web.internal.struts.BaseSamlStrutsAction
Did this article resolve your issue ?

Legacy Knowledge Base