What is the difference b/n memberOf attribute and groupMembership attribute when used in LDAP Authentication settings in Liferay?
The users are imported successfully.
The groups are also imported successfully.
But the users are not assigned to the groups automatically. And when I changed the group variable from ‘groupMembership’ to ‘memberOf’, several users are not able to login to Liferay.
What exactly are memberOf and groupMembership variables?

memberOfis not a “variable”, it is an attribute, or more accurately, it is a virtual attribute, or a dynamic attribute generated on the fly by some directory servers, but not all. Some usememberOfto use in search filters or in the attribute list of a search request, some useisMemberOffor the same purpose, some support both or neither, and there are probably other idioms of which I am not aware.Generally speaking, to determine group membership, issue a search request to the directory server and specify
memberOforisMemberOfto be returned in the attribute list. Here is an example using a modernldapsearchcommand line tool:This search response indicated that
user.0is a member of the listed groups.To reverse the sense of the query, that is, to determine which entries are the member of a group, use the
isMemberOformemberOfwith an assertion in the filter used in the search request:This search response indicates that there are several member of the group whose distinguished name is
cn=persons,ou=groups,dc=example,dc=com.While not specific to LifeRay, the above is a general explanation of one way to deal with group membership and also of reverse group membership from an LDAP perspective.