Viddhiyartha
Viddhiyartha

Reputation: 91

WSO2 Claims for First name

In WSO2 IS admin console, we are trying to set the user claims for a service provider under 'Claim Configuration'.

We selected the Claim mapping Dialect as 'Define Custom Claim Dialect' and added Local claims as :

But when we perform a curl with /oauth2/userinfo, it just gives us last name and email. But first name is not being returned.

Returned User Info:

{"sub":"[email protected]","family_name":"abcFN","email":"[email protected]"}

Any pointers for the issue will be helpful.

Upvotes: 1

Views: 542

Answers (2)

npernoud
npernoud

Reputation: 166

There is actually an error in the mapping of the given name attribute between the oidc claim and the wso2 claim :

In the management console, go to Home > Identity > Claims > List > claim.view Click on http://wso2.org/oidc/claim in the Available Claims Dialect list

Change the mapping for given_name to Mapped Local Claim : http://wso2.org/claims/givenname

Upvotes: 2

Nilasini
Nilasini

Reputation: 414

In order to get the first name through user info endpoint,you should have an OIDC claim mapping with http://wso2.org/claims/givenname.

Could you please check whether your given_name claim under oidc dialect has a mapping with http://wso2.org/claims/givenname.

Upvotes: 0

Related Questions