I'm trying to retrieve some claims (roles, groups, upn) from an ID token using Keycloak as an identity provider for an OIDC app configured on Entra ID.
Using Postman, I can retrieve the ID token directly from Entra ID and the claims are there. So it's just a question of configuring Keycloak to correctly map the claims.
I've tried following this SO link, but with no luck. I've tried both the mapping described and even adding a upn client scope. Ideally, I'm trying to get the roles.
Can someone provide some insight on how to do this?
Regarding the
upnfield as written here it's required the scopeprofile.Open the advanced settings, in the keycloak section "identity provider" and make sure you've added
openid profilein the list of scopes. By default it's empty that means onlyopenid