Hi, Aliaksandr.
Thank you for the quick reply! I tested using the built-in user permissions attribute this morning, and I see similar behavior with them, as well.
For reference, the code I currently have looks similar to the following:
```
def update(self, dynamicScopeContext, configurationAttributes):
"""Updates OIDC scopes returned when queried."""
print "Retrieving dynamic scopes"
dynamicScopes = dynamicScopeContext.getDynamicScopes()
user = dynamicScopeContext.getUser()
jsonToken = dynamicScopeContext.getJsonWebResponse()
claims = jsonToken.getClaims()
# Iterate through list of dynamic scopes in order to add custom scopes if needed
for dynamicScope in dynamicScopes:
if (StringHelper.equalsIgnoreCase(dynamicScope, "custom_attribute")):
my_attributes = user.getAttributeValues("my_attributes")
attribute_return = []
for attribute in my_attributes:
try:
attribute_dict = eval(attribute)
attribute_return.append(attribute_dict)
except Exception as exc:
print exc
attribute_return.append(attribute)
claims.setClaim("custom_attribute", attribute_return)
```
I don't love having an "eval" there, but I understand that the attributes must be stored as text on the backend, so I had hoped that this would allow conversion to a dict within the Jython script. However, each "attribute_dict" still seems to be wrapped as a string in the userinfo response.