How to pass json array in pega custom claims in auth profile for jwt token

Hi Experts,

Need your support how to pass the array in customs claims tabs under auth profile.

image

we have tried the clipboard mapping as well.

we are using pega v24 and how to convert json string to array .

this is expected outcome.

bank:brands”: [
“xyz”
],

Use a Value List of Text property for the claim, for example .brands, and populate it in a data transform like .brands(1) = "xyz". In the custom claims section, set the claim name as bank:brands, change Map from to Clipboard, and give Map from key as .brands. Do not use Constant, and do not convert the value to a JSON string with toJSON() or pxConvertPageToString(). Those methods make Pega send the value as plain text instead of a real array. When the claim is mapped from a Value List property, Pega generates the JWT claim correctly as "bank:brands": ["xyz"].

Thanks a lot. Dynamically defined the value list in DT helps to configure the value in jwt auth profile.

Regards,

Bandna Gupta