Custom added claims not sent when login for first time

We have added custom claim e.g abc, and we try to get required data from accesstoken

We noticed that when i first login only these scopes are passed
[“openid”, “profile”, “email”] and the custom claim “abc” is not included

When login 2nd time onwards it starts to work fine.

So my question is, does okta send some default claims before it gets the custom claim?
How do i resolve this issue

Hi, If you can create Custom authorization server in your Okta Org you can leverage the Token Preview feature to test out the payload returned in the token

The payload of the token shown there is what will be returned in the actual token itself

1 Like

in addition to @vk-giri’s suggestion to check in Token Preview, make sure that the first set of tokens returned during the first login were issued by the authorization server you created the custom claim on and if its the same authorization server issuing tokens during subsequent logins. It’s possible you’re looking at tokens issued by two different authorization servers.

1 Like