def get_ldap_groups(self):
        """Retrieve groups from LDAP server."""
        if (not self.conf_LDAP_SYNC_GROUP):
            return (None, None)
        uri_groups_server, groups = self.ldap_search(self.conf_LDAP_SYNC_GROUP_FILTER, self.conf_LDAP_SYNC_GROUP_ATTRIBUTES.keys(), self.conf_LDAP_SYNC_GROUP_INCREMENTAL, self.conf_LDAP_SYNC_GROUP_FILTER_INCREMENTAL)
        logger.debug("Retrieved %d groups from %s LDAP server" % (len(groups), uri_groups_server))
        return (uri_groups_server, groups)