If you are synchronising users from one system to LDAP, you can check if the User is a member of a Group before adding the User into the Group. This can be achieved by using the LDAP connector. You can do this by providing the User CN and Group DistinguishedName into the filters.
For example, we can put the following details into the filters of connector to perform the search:
| User CN: 112233
Group DistinguishedName: CN=My_Group,OU=User_Groups,DC=test,DC=wdci,DC=com,DC=au
This is the result we will get if the user is found in the group:
<message>User 112233 found in group CN=My_Group,OU=Students,OU=User_Groups,DC=test,DC=wdci,DC=com,DC=au</message>