Legacy Knowledge Base
Published Jul. 2, 2025

Importing LDAP users with the same email address

Written By

Katlyn Lee

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

  • I want to import LDAP users that have the same email address, but the import fails due to an error about a duplicate email address:
    2021-08-02 16:53:47.766 ERROR [https-jsse-nio-4443-exec-13][LDAPAuth:432] 
    Problem accessing LDAP server

    com.liferay.portal.kernel.exception.UserEmailAddressException$MustNotBeDuplicate

Environment

  • Liferay DXP

Resolution

  • This behavior is intended, and Liferay does not support users having duplicate email addresses. To workaround this behavior, you can modify the settings to have users authenticate by screenname and leverage the following portal properties to make email addresses optional:
            
        #
        # Set this to false if you want to be able to create users without an email
        # address. An email address will be automatically assigned to a user based
        # on the property "users.email.address.auto.suffix".
        #
        users.email.address.required=true
    
        #
        # Set the suffix of the email address that will be automatically generated
        # for a user that does not have an email address. This property is not used
        # unless the property "users.email.address.required" is set to false. The
        # autogenerated email address will be the user ID plus the specified suffix.
        #
        users.email.address.auto.suffix=@no-emailaddress.com
            
Did this article resolve your issue ?

Legacy Knowledge Base