Legacy Knowledge Base
Published Jul. 2, 2025

Recurring UserEmailAddressException$MustNotBeDuplicate error importing users with existing emails from LDAP server

Written By

David Tello

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

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

NOTE: This article is an INTERNAL article and is not visible to customers, currently. Please only link this article in internal comments, but not public comments.

Issue

  • There are recurrent UserEmailAddressException$MustNotBeDuplicate errors in the logs when syncing between Liferay and an LDAP server.
  • In each sync iteration, in the log are registered errors like this:
    com.liferay.portal.kernel.exception.UserEmailAddressException$MustNotBeDuplicate: User XXXXXX cannot be created because a user with company YYYYYYYYYY@domain.com and email address XXXXXX is already in use
  • The errors show the problematic users and their email addresses.

Environment

  • Liferay DXP 7.0+

Resolution

  • The values of attributes ScreenName and EmailAddress must be unique in the Liferay instance.
  • In the sync LDAP process:
    • When a new user is detected in a sync iteration, the user will be imported to Liferay from LDAP.
    • At this moment, the user attributes will be validated.
    • This validation process checks that the ScreenName and Email of the new user are no present in any other existing user. If this happens, a MustNotBeDuplicate exception will be thrown.
    • This is one of the main error causes when importing users.
  • If you have this kind of fail, you will have to review the problematic users' attributes and resolve these attribute conflicts to be able to import them.

 

 

 

Did this article resolve your issue ?

Legacy Knowledge Base