Featured post

Docker setup for Liferay 7 with MySQL

Tuesday, 15 May 2012

Liferay authentication fails for screen name authentication when "mail" attribute is not set in LDAP (AD)

Context : 
1) A valid user in Active Directory exists
2) The "mail" entry is missing in the Active Directory for the user
3) The authentication is set by Screen Name

When tries to login, the authentication fails. This issue is not occurring in other applications using Active Directory

Question :
If it is intended behavior for authentication to fail if email is not configured in LDAP. Is this correct?  If so,

Answer :
Here is a response to that question.  It is not a bug.  In order for a user to be authenticated in the
Liferay Portal, five pieces of user data are needed.  Without these, user authentication will fail.

They are:

1.  Screen name
2.  First name
3.  Last name
4.  Email
5.  Password

Problem :
In My Company all the accounts do not have “mail” attribute set in LDAP. None of the other application has any issue with this. These application can authenticate for all the users. If this is a requirement from liferay that all the users should have their “mail” set in LDAP, that would be a major task.

If the validation is through screen-name. So mail should not be mandatory.

Resolution :
 So in this case, you need to set:

      users.email.address.required=true to "false."
        # 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".

Also, notice this following property from portal.properties.

You can set the suffix of the email address that you desire to be generated for a user who does not have an email address.  This can only be used if the previous property  is set to false.
        # 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.


You are just done, Try & Enjoy the function.............:))


  1. Thanks for these informations...but I can't find the portal.porperties file...
    Can you tell where can I find it ? or did I need to create it ?

    Thanks & Regards

    1. Hi Jlassi,

      You can find portal.properties in ROOT/WEB-INF/classes.
      But it's not advisable to change this file directly.

      Create a new file named portal-ext.properties besides your tomcat folder and then made change in it.


  2. The website is looking bit flashy and it catches the visitors eyes. Design is pretty simple and a good user friendly interface. flatbed screen printing machine

  3. You completed certain reliable points there. I did a search on the subject and found nearly all persons will agree with your blog. t-shirt prints

  4. Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks names of shops

  5. This forward leap and effectively versatile screen printing method permits you to communicate your unusual side. ONCETECH

  6. i read a lot of stuff and i found that the way of writing to clearifing that exactly want to say was very good so i am impressed and ilike to come again in future.. names of organizations

  7. Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet! digital marketing agency

  8. Super-Duper site! I am Loving it!! Will come back again, Im taking your feed also, Thanks. denver airport shuttle

  9. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. unique business names

  10. What is an outstanding post! “I’ll be back” (to read more of your content). Thanks for the nudge! techwear-x.com

  11. Interesting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks creative business name

  12. Thank you for some other informative blog. Where else could I get that type of information written in such an ideal means? I have a mission that I’m just now working on, and I have been at the look out for such information. tech company names

  13. Some truly wonderful work on behalf of the owner of this internet site , perfectly great articles . short business names

  14. Do you want to know when your neighbors are selling their properties in Canada? Do you want to know the market trends in your area of Canada?

  15. hi was just seeing if you minded a comment. i like your website and the thme you picked is super. I will be back. company name ideas

  16. i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side.Motel Broker in kansas

  17. Everything is very open with a really clear description of the issues. It was really informative. Your website is very helpful. Thank you for sharing!Cost real estate agent

  18. Really interesting to read the story here shared and I feel special. The way the story presented also makes us more interesting. I'm looking forward to these kinds of the informative article and continue sharing more stories like this.Apartments in Thrissur

  19. Very nice tips which anyone can apply when selling their property. A word of mouth through friends and family is also fantastic since you can get a buyer just there.best estate agent in siem reap

  20. I comprehend it is expensive and I comprehend there are examples it doesn't create telephone calls yet on the off chance that you are going to endure in the real estate putting business area simply place it in there and leave it.Harga beton ready mix Jakarta


  21. Your article makes perfect sense. Writing that is worth reading. oh yeah btw also visit my website. Thanks
    Sewa Alat Berat


  22. it's really nice and meanful. it's really cool blog. Linking is very useful thing.you have really helped lots of people who visit blog and provide them usefull information. Bed Bug Treatment Orlando


  23. I like this website very much so much fantastic information.
    Harga Beton K300

  24. I recommend only good and reliable information,
    Jasa Cut and Fill

  25. Fantastic article. Your works are distinctive, easy to understand, and contain informative and inspiring material. Keep up the fantastic work! Visit Us

    Jasa Foto Pernikahan