This commit is contained in:
@@ -778,7 +778,9 @@ export class KeycloakAdminClient {
|
||||
const alreadyInNewGroup = primaryGroups.some(g => g.name === newGroupName);
|
||||
if (!alreadyInNewGroup) {
|
||||
console.log(`[keycloak-admin] Adding user to new group: ${newGroupName}`);
|
||||
const newGroupId = await this.getGroupByPath(newGroupName);
|
||||
const newGroupPath = `/${newGroupName}`; // Keycloak groups use path format with leading slash
|
||||
console.log(`[keycloak-admin] Looking up group with path: ${newGroupPath}`);
|
||||
const newGroupId = await this.getGroupByPath(newGroupPath);
|
||||
await this.assignUserToGroup(userId, newGroupId);
|
||||
} else {
|
||||
console.log(`[keycloak-admin] User already in target group: ${newGroupName}`);
|
||||
|
||||
Reference in New Issue
Block a user