# Role selection going wrong with filtering during role assignment to user group/user

**URL:** <https://forum.keycloak.org/t/role-selection-going-wrong-with-filtering-during-role-assignment-to-user-group-user/27969>\
**Category:** Getting advice\
**Tags:** admin-console, authentication\
**Created:** [September 20, 2024, 9:10am UTC](https://forum.keycloak.org/t/role-selection-going-wrong-with-filtering-during-role-assignment-to-user-group-user/27969 "2024-09-20T09:10:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![usertech01](https://avatars.discourse-cdn.com/v4/letter/u/a9a28c/32.png) [@usertech01](https://forum.keycloak.org/u/usertech01)\
**Post date:** [September 20, 2024, 9:10am UTC](https://forum.keycloak.org/t/role-selection-going-wrong-with-filtering-during-role-assignment-to-user-group-user/27969/1 "2024-09-20T09:10:27Z")

</div>

While testing admin console in version 25.0.5 & now in 25.0.6, we have identified a selection issue in role which causing misconfigurations in role-assignment.

![Keycloak_role_select_issue](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/5/5e547fd58760f943ecfb1f4d9958dfbae0810902.gif)

Eg:

1. Open Group Details \> Role Mapping \> Assign Role
2. Select “Filter by realm role”
3. There are 200 roles t\_role1 to t\_role200
4. When searching107 in filter, it is listing t\_role101, t\_role107 and t\_role171
5. Select role t\_role101
6. #ISSUE: Clear filter, now showing default first role default-roles-test as selected
7. When searching again107 in filter, it is listing t\_role101 as selected
8. Select t\_role171 also
9. . #ISSUE: Clear filter, now showing 1st and 3rd from the default listing as selected

If somebody faced this issue, please advice if there is any workaround to make this stable.

Thanks in advance
