The property audienceArray was built as ValueList of string, but when I process the token via pxProcessJWT activity i correctly get the “sub” token, but there’s an exception about the “aud” elements:
Step Status
FAIL
Step Status Info
class "java.util.Arrays$ArrayList" does not match mode "String List" of property "operatorPage.AudienceArray". Details: Invalid value for aValue passed to com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.setValueOverride(Object)
Which kind of property mode is more suitable for this scenario?
Can you try mapping it to a Page List property of class SingleValue-Text instead?
While I haven’t configured a Token Profile for this specific array scenario, Pega typically handles JSON string arrays (like in REST integration metadata) by mapping them to a Page List using SingleValue-Text rather than a Value List.
The error message you are seeing (java.util.Arrays$ArrayList not matching property mode String List) strongly suggests that the engine is trying to map a Java list collection directly into a structure it expects to be an object-based list. Swapping to a Page List with a single value text class might resolve this mismatch. Let us know if that works!
For a JWT claim like aud, the cleanest options are:
Use a Text property only if aud is guaranteed to be a single string.
Use a Page List / Value List only if the token mapping converts each array item individually.
Use a Java Object property if the inbound token processing is handing you the raw JSON array object directly.
In your specific case, because the token contains aud: [“Pega_REST_API”] and Pega is complaining about ArrayList, I would suggest changing operatorPage.AudienceArray to a Java Object property first, then convert it to a string list later if needed in your activity logic.
don’t use String List mode for this claim; use Java Object if you want to preserve the inbound array, or refactor the mapping so the claim is handled as a true list element-by-element.