# Creating a dynamic hardcoded scoped claim for users of a specific client

**URL:** <https://forum.keycloak.org/t/creating-a-dynamic-hardcoded-scoped-claim-for-users-of-a-specific-client/30099>\
**Category:** Getting advice\
**Created:** [June 11, 2025, 7:54am UTC](https://forum.keycloak.org/t/creating-a-dynamic-hardcoded-scoped-claim-for-users-of-a-specific-client/30099 "2025-06-11T07:54:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xsrf](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xsrf/32/1338_2.png) [@xsrf](https://forum.keycloak.org/u/xsrf)\
**Post date:** [June 11, 2025, 7:54am UTC](https://forum.keycloak.org/t/creating-a-dynamic-hardcoded-scoped-claim-for-users-of-a-specific-client/30099/1 "2025-06-11T07:54:12Z")

</div>

Hi,  
I need so send a scoped user attribute that doesn’t exist 1:1 in my user-directory to a specific OIDC client, preferably as “email” claim but a custom claim may also work.  
In the specific use-case the value must be “username@domain.tld” with the username being the actual username of the user and “domain.tld” being a fixed hardcoded value.  
I see two ways to construct this claim.

1. just append “@domain.tld” to the username
2. filter a given multi-value attribute of my users to match “\*@domain.tld”, as it is available as one of the users email aliases

Is this somehow possible just via configuration? I know I can add mappers on the client specific scope to add hardcoded claims - but I haven’t found any information about using placeholders there to e.g. create “{username}@domain.tld”. It just allows for values that are hardcoded and identical for all users, right?

Example:

```auto
user: { 
  username: "max",
  email: "max.m@different-domain.tld",
  alias: ["max.m@different-domain.tld","max@domain.tld","mm@3rd-domain.tld"]
}

-> id_token: { ... email: "max@domain.tld" ... }

```
