Rule Types
Each tab of the Permissions page grants permissions from a different source:
Rules are cumulative: a user receives the permissions of every matching rule. Priority orders rules, but a higher-priority rule never removes permissions granted by another rule.
You need admin access to manage rules.
Authentication-Based Permissions
Choose the permissions granted to everyone who opens the chat widget:- Anonymous users: users who open the widget without authentication
- Authenticated users: users who open the widget while signed in
Email-Based Permissions
Email Domains
Grant permissions to every user whose email belongs to a domain, for example all employees ofexample.com. Use * to match every domain.
Specific Emails
Grant permissions to one person by exact email address, for example an external consultant or a pilot customer. The fields are the same as for domains, with Email instead of Domain.Client Portal Admission
An active Specific Emails or Email Domains rule also lets matching non-administrator users enter the client portal when they sign in with an AGO account. A wildcard domain rule (*) admits every signed-in user. Admin accounts are exempt from this check.
Permissions granted another way do not admit a user to the portal. A user can have agent permissions and still receive 401 Unauthorized at portal sign-in when no active email rule matches. See Portal Access and Agent Permissions.
JWT-Based Permissions
When your site authenticates widget users with a JWT, grant permissions from the token’s claims. Click Add JWT Rule, add one or more conditions, and select the Permissions to Grant. Each condition has a field (the claim name, with dot notation for nested claims such asuser_metadata.subscription), an operator, and a value. Turn on Negate to grant the permissions when the condition does not match.
Available operators: Equals, Not Equals, Contains, Not Contains, In, Not In, Greater Than, Less Than, Exists, Not Exists, Is Null, Not Null, Starts With, Ends With and Regex.
All conditions in a rule must match (AND). For OR, create one rule per alternative that grants the same permission.
See Access Control Examples for a step-by-step setup and sample conditions.
API-Based Permissions
When an API data source returns information about the user, such as their plan or account status, add rules that grant permissions from that data. Conditions use the same operators as JWT rules. To check a configuration, run a test from Studio > Data > API Integration: it shows the API response, the matched rules and the granted permissions.Best Practices
- Give higher priorities to more specific rules, and give each rule a clear name.
- Test with non-admin accounts: admins can access every agent, whatever the rules say.
- Use Negate sparingly; negative conditions are harder to read.
- Review rules periodically and remove the ones you no longer need, starting with broad wildcard rules.
Troubleshooting
User not getting expected permissions
User not getting expected permissions
- Check that the rule and the permissions it grants are active.
- Check that every condition matches: conditions in one rule use AND.
- For JWT rules, check the exact claim name, including case and nested path.
- Check that the intended agents are linked to the granted permissions.
Too many permissions granted
Too many permissions granted
- Rules are cumulative: look for overlapping rules.
- Review wildcard domain rules (
*), which apply to everyone. - Review the Authentication-based permissions defaults.
Client portal returns 401
Client portal returns 401
The user needs an active Specific Emails or Email Domains rule to enter the portal, even if they already have permissions. A new rule can take up to a minute to apply.
Related Documentation
- Agent Permissions - Control agent access
- Access Control Examples - JWT rule setup
- Configure Access Control for Multiple Teams - Step-by-step guide
- Widget Authentication - JWT integration
- Security Overview - Authentication methods
