1

I’ve been trying to add the client id to the userinfo, so I can retrieve it when consuming the /userinfo endpoint.

I’ve tried a few mappers and managed to add a lot of useful information in it, but not the client_id itself.

I can’t rely on customization. Everything must be done with native configuration. Also I am using KeyCloak version 18.0.2.

My last attempt was to a User Property and look for the serviceAccountClientId from the class User Model, but it didn’t workout.

  • you can add `specific client id` into user's attribute in [here](https://stackoverflow.com/questions/75530965/how-to-add-programmed-custom-field-to-keycloak-user/75532971#75532971) – Bench Vue Jun 30 '23 at 18:04

1 Answers1

0

You can get the client_id from the ID token Audience "aud" field.