I am using an OIDC connection to authenticate with another party. They are passing a claim on the id_token, that I would like to pass along onto the access_token, so we can read it from the backend.
I know I can add custom claims with the rules, but can I read the id_token of the provider in that as well?
I figured out a way to do it. Instead of registering the connection as an OIDC connection, I used a social connection, which allows a custom userprofile script. This allowed me to read the claim from the token and add it to the userprofile.