KEYCLOAK-11582 Fix ldap groups sync which fails when syncing back to MSAD (#6348)
* KEYCLOAK-11582 Fix sync which fails when syncing to MSAD
This commit is contained in:
parent
bc5b4de79e
commit
3d175dbe0c
1 changed files with 32 additions and 33 deletions
|
@ -450,8 +450,8 @@ public class GroupLDAPStorageMapper extends AbstractLDAPStorageMapper implements
|
|||
logger.debugf("Syncing groups from Keycloak into LDAP. Mapper is [%s], LDAP provider is [%s]", mapperModel.getName(), ldapProvider.getModel().getName());
|
||||
|
||||
// Query existing LDAP groups
|
||||
try (LDAPQuery ldapQuery = createGroupQuery(config.isPreserveGroupsInheritance())) {
|
||||
List<LDAPObject> ldapGroups = ldapQuery.getResultList();
|
||||
|
||||
List<LDAPObject> ldapGroups = getAllLDAPGroups(config.isPreserveGroupsInheritance());
|
||||
|
||||
// Convert them to Map<String, LDAPObject>
|
||||
Map<String, LDAPObject> ldapGroupsMap = new HashMap<>();
|
||||
|
@ -488,7 +488,6 @@ public class GroupLDAPStorageMapper extends AbstractLDAPStorageMapper implements
|
|||
processKeycloakGroupMembershipsSyncToLDAP(kcGroup, ldapGroupsMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return syncResult;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue