# Assigning roles with additional attributes

**URL:** <https://forum.keycloak.org/t/assigning-roles-with-additional-attributes/26370>\
**Category:** Miscellanaeous\
**Created:** [June 5, 2024, 11:15am UTC](https://forum.keycloak.org/t/assigning-roles-with-additional-attributes/26370 "2024-06-05T11:15:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Himay45](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@Himay45](https://forum.keycloak.org/u/Himay45)\
**Post date:** [June 5, 2024, 11:15am UTC](https://forum.keycloak.org/t/assigning-roles-with-additional-attributes/26370/1 "2024-06-05T11:15:21Z")

</div>

Imagine I have a role “Mayor”. Now I want to assign this role to my users mentioning which city this user is its mayor. For example, user A is the mayor of city C1 and user B is the mayor of C2. I tried handling this with role attributes, but attributes cannon be changed in assigning roles to users. So it was impossible.

Does anyone have any idea how can I handle this in Keycloak?
