Duplicate user errors when setting up a SAML Authentication to replace an existing Token-Based SSO
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
- When trying to set up a SAML authentication to replace existing Token-Based SSO, there are errors that populate stating that the user and/or email address is already in use.
- Updating the email address and initial user creation via SAML fixed the issue, but when logging back in with the SAML User it isn't recognized and tries to create a new account.
Resolution
- There is an existing workaround that is available and should fix the behavior in your instance. Simply adding some different configurations to your environment should produce a successful login attempt.
- Setup Liferay instances as SP and IDP, use screenName as NameId
- Create a user on SP with below credentials
screenname: user2
email address: user1@liferay.com
first name: u1
last name: u1
password: test
- Create a user on IDP with below credentials
screenname: user1
email address: user1@liferay.com
first name: u1
last name: u1
password: test
- Open new browser session (different browser/incognito) and access SP
- Click “Sign In” => You are redirected to IDP
- Sign in with user1@liferay.com
Result: Login fails. In the log you can see the following.2023-09-20 16:41:59.039 ERROR [http-nio-8080-exec-7][BaseSamlStrutsAction:59] A user with company 20101 and email address user1@liferay.com is already in use
-
7. Change SAML config on both SP and IDP to use emailAddress as NameId
8. Access SP and Sign in with user1@liferay.com
Result: Successful login
Did this article resolve your issue ?