Message Boards

Load/Sync Particular LDAP groups in Liferay DXP

sree p, modified 3 Years ago.

Load/Sync Particular LDAP groups in Liferay DXP

Junior Member Posts: 91 Join Date: 10/3/19 Recent Posts
Hello,  I want to load/sysnc specific LDAP groups into Liferay DXP,  which filter I have to use ? and do I need to list out groups in ldap configuration on liferay instace configuration ? I am following this document https://help.liferay.com/hc/en-us/articles/360017896112-LDAP
thumbnail
Nikhil Nishchal, modified 3 Years ago.

RE: Load/Sync Particular LDAP groups in Liferay DXP

Regular Member Posts: 177 Join Date: 6/22/12 Recent Posts
Hi ,

If you update group info in ldap setting it will automatically sync user with that user group.
If not in liferay then it will create and assign user to that.

Thanks!
sree p, modified 3 Years ago.

RE: Load/Sync Particular LDAP groups in Liferay DXP

Junior Member Posts: 91 Join Date: 10/3/19 Recent Posts
thanks Nikihil for your response, but what I am asking is I have 10 groups and each group of 10k users, out of 10 groups, I want to load/sych particular groups (lets say 4 groups , I don't want to sync/load remaining 6 groups and their users into Liferay) into liferay from LDAP including with users of those groups.
sree p, modified 3 Years ago.

RE: Load/Sync Particular LDAP groups in Liferay DXP

Junior Member Posts: 91 Join Date: 10/3/19 Recent Posts
any idea on this ?
thumbnail
Christoph Rabel, modified 3 Years ago.

RE: Load/Sync Particular LDAP groups in Liferay DXP

Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts
I did not try it, but can't you just set the import method to Group (default is User) and then specify a groupfilter?
sree p, modified 3 Years ago.

RE: Load/Sync Particular LDAP groups in Liferay DXP

Junior Member Posts: 91 Join Date: 10/3/19 Recent Posts
yes , I choose Group for import, can you please provide group filter and let me know where should I give that?
thumbnail
Christoph Rabel, modified 3 Years ago.

RE: Load/Sync Particular LDAP groups in Liferay DXP

Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts
You need to enter a filter in the Groups Import Search Filter
Probably something like this is the default: (objectClass=groupOfUniqueNames)
Now you need to enter a filter, that specifies only the groups you need (alternatively you can specify the groups you want to exclude. You can negate the filter with the exclamation mark symbol). Just search for ldap filter examples.
Something like this should work:
&(objectClass=groupOfUniqueNames)(|(cn=GROUPNAME1)(cn=GROUPNAME2)(cn=GROUPNAME3))
In Java this would be the same as
if (objectclass.equals("groupOfUniqueNames") && (cn.equals(GROUPNAME1) || cn.equals(GROUPNAME2) || cn.equals(GROUPNAME3) ))