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 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 importing users to Liferay DXP from LDAP, they are not being assigned the roles I want them to have from my LDAP server.
Environment
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 ?