Over a million developers have joined DZone.
Gold Partner

How to import LDAP Groups, but not Users, to Liferay

The Integration Zone is brought to you in partnership with CA Technologies. Download their eBook to learn more about API Strategy and Architecture.

When you configure Lifeary to talk to an LDAP - it imports users and groups in two different ways.

1. Import users and while importing users look at the "Group" attribute of the user and import groups.
2. Import groups and while importing groups look at the "User" attribute of the group and import all the users of that group.

By default Liferay uses the first approach.

If we want to import Groups only - not the users from the LDAP - then we need to have the 2nd approach.

To enable the second approach, you need to add the following to the liferay_home/tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties file.

ldap.import.method=group

Then you need to keep the "User" attribute of the group configuration blank.

The Integration Zone is brought to you in partnership with CA Technologies. Use this model to create a sustainable API strategy that will help your organization adapt and succeed in the app economy.

Topics:

Published at DZone with permission of Prabath Siriwardena , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}