Legacy Knowledge Base
Published Jul. 2, 2025

How Can I Assign Roles to Users When Importing from LDAP?

Written By

Michael Warren Young

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.

Issue

  • When importing users to Liferay DXP from LDAP, they are not being assigned the roles I want them to have from my LDAP server.

Environment

  • Liferay DXP
  • LDAP

Resolution

  • In Liferay DXP, Users are imported from LDAP by Group
  • In Liferay, create a User Group in Liferay with the same name as the LDAP Group the users you want to grant roles to belong to.
  • Roles can be assigned to the created User Groups in order to grant roles and permissions to users from the same LDAP Group.
    • Example: If you have a group in LDAP called "Admins" and you want to grant them the "Site Administrator" role in Liferay, create a Liferay User Group called "Admins" and grant the "Site Administrator" role to the User Group.
    • Users assigned to the "Admins" User Group during the LDAP import will inherit the "Site Administrator" role from the User Group.
  • If more control is needed over the specific permissions to assign to User Groups, the setting Create Role per Group on Import can be checked.
  • With this setting, each Group imported from LDAP will have a Role created for it and specific permissions can be assigned to each Group using the created Role.
Did this article resolve your issue ?

Legacy Knowledge Base