Forum Discussion

goyalshubham13's avatar
goyalshubham13
Copper Contributor
May 19, 2021

Custom claims in ID Token

Hi there,

 

I am looking for a way to return custom claims in user JWT (ID tokens). values inside custom claim object will be read from user profile.

 

Ex: user profile 

 

{
  "name": "Shubham",
  "email": "email@example.com",
  "address": "address1, city, country",
  "licenses": [
    {
      "number": "123456789",
      "key": "ey1234556hyuutt667"
    },
    {
      "number": "123456710",
      "key": "ey1234556hyuutt667"
    }
  ]
}

 

 

user JWT we expect:

 

{
  "https://qlik.com/claims/licenses": [
    {
      "number": "123456789",
      "key": "ey1234556hyuutt667"
    },
    {
      "number": "123456710",
      "key": "ey1234556hyuutt667"
    }
  ],
  "name": "Shubham Goyal",
  "updated_at": "2021-05-19T19:03:28.104Z",
  "email": "example@email.com",
  "email_verified": true,
  "sub": "user_id",
}

 

 

 

Questions:

 

Can we achieve this via Admin UI? If not what kind of config change/code change we need?

 

Thanks in advance for your help.

 

No RepliesBe the first to reply

Resources