keycloak/keycloak-nodejs-admin-client

`users.listGroups` does not support `briefRepresentation`

ddezoysa opened this issue · 0 comments

Describe the bug
Although groups.find supports briefRepresentation: false to fetch additional attributes of the group,
users.listGroups does not support briefRepresentation

To Reproduce
Steps to reproduce the behavior:

  1. What API did you use? users.listGroups
  2. What error message did you see? No error message, but group attributes are null.
  3. GIve us a minimum code example
    const group = await kcAdminClient.groups.create({
      name: "cool-group",
      attributes: {
        website: ["www.google.com"]
      }
    });

    const user = await kcAdminClient.users.create({
      username: 'wwwy3y3@canner.io',
      email: 'wwwy3y3@canner.io',
      // enabled required to be true in order to send actions email
      emailVerified: true,
      enabled: true
    });

    await kcAdminClient.users.addToGroup({
      groupId: user.id!,
      id: group.id!,
    });

    const groups = await kcAdminClient.users.listGroups({id: user.id!});
    console.log(groups[0].attributes);

Expected behavior
website: ["www.google.com"] attribute should not be null

Screenshots
If applicable, add screenshots to help explain your problem.

Enviroment (please complete the following information):

  • OS: [e.g. Ubuntu] - MacOS Big Sur
  • Keycloak Version - 15.0.2
  • Library Version [e.g. 1.9.0] - "@keycloak/keycloak-admin-client": "16.0.0-dev.38"

Additional context
Add any other context about the problem here.