Prerequisites
- Admin access to AGO
- Working widget JWT authentication
- Active permissions created under AI Studio → 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 AI Studio → 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 AI Studio → Agents and select its permissions in Access Control.
- 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. Their condition representation is:
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 Channels → Widget & SDK, JWT field mappings extract claim values for additional user information. A mapping fromuser_metadata.subscription to the label Subscription Tier stores that exact label; it does not normalize it to subscription_tier.
JWT-based permission rules still use the original claim path user_metadata.subscription. They do not use the display label or a jwt_claims. prefix. The stored jwt_iss value comes from the token’s iss claim and is empty when that claim is absent.
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 portal’s permission 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.
