Eden Ben Shoshan
03/24/2026, 5:38 PM"userCustomAttributes": {
"isBlocked": "{{user.customAttributes.blocked}}"
},
But it didn't work. Can it be done? would love your help pleaseDevRev
03/24/2026, 5:38 PMuserCustomAttributes
- Type: Dynamic
- Value: user.customAttributes
This will include the entire customAttributes object in your JWT .
Advanced Configuration Method
For your advanced mode approach, the syntax should be:
{
"userFeatureFlags": {
"isBlocked": "{{user.customAttributes.blocked}}"
}
}
Troubleshooting Your Configuration
The issue with your current advanced configuration might be:
• Missing quotes around the template variable
• Ensure the custom attribute blocked exists on the user
• Verify the user has the customAttributes populated
Alternative Approach
You can also use the Custom Claims action in Descope Flows to add these claims dynamically during authentication .
• Add a Custom Claims action to your flow
• Set Key: userCustomAttributes
• Set Type: Dynamic
• Set Value: user.customAttributes
The dynamic values are populated from available Descope user data .
Custom Claims Overview | Descope Documentation
Add User Information to JWT Response Using Descope Flows
Dynamic Keys & Values | Descope DocumentationEden Ben Shoshan
03/24/2026, 5:40 PMDevRev
03/24/2026, 5:40 PMcustomAttributes populated
2. Check if the specific attribute blocked exists on the user
3. Ensure the JWT template is assigned to your application
Correct Syntax for Advanced Mode
Try this exact syntax in advanced mode:
{
"userCustomAttributes": "{{user.customAttributes}}",
"userFeatureFlags": {
"isBlocked": "{{user.customAttributes.blocked}}"
}
}
Alternative Dynamic Reference
Based on the documentation, you might need to use unauthUser instead :
{
"userCustomAttributes": "{{unauthUser.customAttributes}}",
"userFeatureFlags": {
"isBlocked": "{{unauthUser.customAttributes.blocked}}"
}
}
Verify JWT Template Assignment
• Ensure your JWT template is set as the default for your project
• Check that the template is being used by your authentication flow
Test with Simple Attribute First
Try testing with a basic user attribute to confirm the template works:
{
"testClaim": "{{user.email}}"
}
If none of these work, the issue might be with how the custom attributes are stored on the user or the template assignment. Can you confirm if the user has custom attributes populated and which approach you tried?
Dynamic Keys & Values | Descope DocumentationEden Ben Shoshan
03/24/2026, 5:43 PM"userCustomAttributes": "{{user.customAttributes}}",
"userFeatureFlags": "{{user.customAttributes}}"DevRev
03/24/2026, 5:43 PM{
"userCustomAttributes": {{user.customAttributes}},
"userFeatureFlags": {
"isBlocked": {{user.customAttributes.blocked}}
}
}
Verify Custom Attributes Exist
Check that your test user actually has customAttributes populated by:
1. Going to User Management in the console
2. Finding your test user
3. Confirming custom attributes are present
The literal template strings in your JWT suggest the template engine isn't processing the variables, which typically means the template isn't active or properly assigned.Eden Ben Shoshan
03/24/2026, 5:45 PMDevRev
03/24/2026, 5:45 PMuserCustomAttributes, Type: Dynamic, Value: user.customAttributes
This approach bypasses JWT templates entirely and adds claims directly during authentication .
The documentation doesn't cover this specific template assignment issue in detail. I'd recommend confirming with Descope support how JWT templates are properly assigned to your authentication method.
Custom Claims Overview | Descope DocumentationEden Ben Shoshan
03/24/2026, 5:47 PMDevRev
03/24/2026, 5:47 PMcustomAttributes populated or the reference path is incorrect.
Debug Steps
1. Test with known user data first:
{
"testEmail": "{{user.email}}",
"testUserId": "{{user.userId}}"
}
2. Check if user has custom attributes:
- Go to User Management in console
- Find your test user
- Verify customAttributes field exists and has data
3. Try alternative reference paths:
{
"userCustomAttributes": "{{user.customAttributes}}",
"specificAttribute": "{{user.customAttributes.blocked}}"
}
Common Issues
• User doesn't have customAttributes set
• Custom attribute blocked doesn't exist on the user
• Wrong attribute name (case-sensitive)
Verify User Data
Create a test user with custom attributes via the Management API or console, then test the template. If {{user.email}} resolves but {{user.customAttributes}} doesn't, the user likely has no custom attributes set.
The template engine is working (since you see new attributes), but the specific data path user.customAttributes is returning empty/null values.Bhagwanta Yeole
03/24/2026, 6:52 PMEden Ben Shoshan
03/24/2026, 8:31 PM"anotherTryWithUser": "{{user.customAttributes}}",
"userFeatureFlags": "{{user.customAttributes}}"
worth mentioning that it does work for tenant's customAttributesBhagwanta Yeole
03/24/2026, 8:34 PMEden Ben Shoshan
03/24/2026, 8:34 PMEden Ben Shoshan
03/24/2026, 8:35 PMBhagwanta Yeole
03/24/2026, 8:38 PMEden Ben Shoshan
03/24/2026, 8:38 PM