Prerequisites
- Admin access to AGO
- Working widget JWT authentication
- Active permissions created under Agents → Permissions, with the intended agents linked to them
admin or analytics does not grant administration or reporting roles. Manage those roles separately through user management.
From JWT Claims to Permissions
1
Choose the claims to match
For example, your authentication service might issue a signed token with these claims. This is a payload illustration, not a usable token; use the issuer, audience, expiry, and signing configuration required by your workspace.Use the claim’s exact name as the rule field. Nested claims use dot notation, such as
user_metadata.subscription or location.region.2
Create the rule
- Open Agents → Permissions → JWT-based permissions.
- Click Add JWT Rule and name the rule.
- Add a condition with a field, operator, and value. For the token above, use field
department, operator Equals, and valueIT. - Select the permissions to grant, keep the rule active, and click Save.
3
Link agents and test
- Edit each intended agent under Agents and select its permissions in its Permissions tab.
- Authenticate the widget with a valid token issued for a non-admin test user.
- Check that the expected agents are available. Repeat with a user whose claims do not match.
Example Conditions
The permission names below are examples to create in your workspace. Link the desired agents to each permission before testing.
For enterprise users in Europe, put both conditions in the same rule:
user_metadata.subscription Equals enterprise, and location.region Equals europe.
To grant one permission to either pro or enterprise subscribers, create two matching rules that grant the same permission. Multiple conditions within one rule use AND, not OR.
For a non-trial audience, combine an Exists condition on user_metadata.subscription with a Not Equals condition whose value is trial. The existence check avoids treating a missing claim as a known non-trial subscription.
JWT Field Mappings Are Separate
Under Support → Settings → Your channels → Widget & SDK, JWT field mappings copy claim values into the user’s information under a label, for exampleuser_metadata.subscription shown as Subscription Tier.
JWT-based permission rules don’t use these labels. They always read the original claim path, here user_metadata.subscription.
Verify the Result
Use a representative non-admin account with a valid signed token. Check matching and nonmatching values, missing claims, and users who match more than one rule. Confirm both the visible agents and whether the user can start the intended conversation. The chat’s profile selector can help preview a permission, but it does not change your identity or test another user’s JWT. Portal sign-in also has a separate email access check.Troubleshooting
Rule not applying
Rule not applying
- Check that the rule and its granted permissions are active.
- Check the original JWT claim name, including case and nested path.
- Verify that every condition matches the actual payload.
- Check that the intended agents are active and linked to the granted permissions.
Field not found
Field not found
JWT rules read the original token payload. A display label such as
Subscription Tier does not replace the claim path user_metadata.subscription. Check the payload issued by your authentication service.Unexpected permissions
Unexpected permissions
Review all matching rules, including email/domain rules and direct permission assignments. Grants accumulate; increasing a rule’s priority does not remove permissions granted elsewhere. Test with a non-admin account.
