Creating client scope with read only user meta data

I have set up LDAP integration and need to include LDAP group information in the JWT token. I found that mapping LDAP groups to Keycloak groups is a possible solution, but it’s not feasible for me since I already have existing implementations based on groups. To work around this, I created a user attribute and used the LDAP mapper with the memberOf/member property to update the user attribute, but this approach isn’t working. I also explored using the LDAP_ENTRY_DN user metadata and added a client scope with the user property set to LDAP_ENTRY_DN, but that didn’t work either. Is there another way to achieve this?