Keycloak allows to add custom attributes to users. However, in order for these attributes to appear in access token, we have to add a protocol mapper in the "client". If you have many clients and all clients are interested in those attributes, it becomes more effort to add these protocol mappers in all the clients. I was wondering if it is possible to add a protocol mapper on realm level so the attribute is always present in access tokens for all clients?
I would try to create Client Scope
with mapper, which will be Assigned Default Client Scope
on the realm level.