Overview
The impersonation feature enables:- Testing agent access for different user types
- Debugging permission-related issues
- Previewing the user experience before deployment
- Validating access control rules
How It Works
User Type Priority
When no user type is explicitly selected, the system automatically uses the user type with the highest priority number. This ensures a consistent default experience.Agent Selection Logic
Note: When bothagent_idandpermission_idare provided in a request, the system prioritizesagent_idand validates that the user has permission to access it.
Using Impersonation
1
Access the Impersonation Selector
- Navigate to the admin interface
- Locate the user type selector next to the agent dropdown
- Click to open the impersonation modal
2
Select a User Type
- Choose from available user types in your organization
- The agent list will refresh to show only agents accessible to that user type
- Select a specific agent or use the default
3
View as the Selected User
Once impersonation is active:
- All navigation and features reflect the selected user type’s permissions
- Agent responses will use the selected agent’s configuration
- Access controls are enforced as they would be for that user type
4
Exit Impersonation
- Select your original user type from the dropdown
- Or click the “Exit Impersonation” button to return to your admin view
Use Cases
Testing Access Control Rules
Before deploying new access rules, use impersonation to verify:- Users see only their permitted agents
- Knowledge sources are properly filtered
- Tools are available as expected
Troubleshooting User Issues
When a user reports access problems:- Impersonate their user type
- Attempt to reproduce the issue
- Identify missing permissions or misconfigured rules
Validating Agent Configuration
After configuring a new agent:- Impersonate each user type that should have access
- Verify the agent appears in their list
- Test the agent’s responses and tool availability
API Reference
Request Parameters
Behavior Rules
- If
agent_idis provided withoutpermission_id, the system validates access before proceeding - If both are provided,
agent_idtakes precedence - If neither is provided, defaults are used based on priority
Best Practices
Security Considerations
- Impersonation is logged for audit purposes
- Only administrators can access impersonation features
- Impersonated actions are marked in system logs
Testing Workflow
- Create test user types for each permission level
- Document expected access for each user type
- Test systematically through all user types after configuration changes
- Verify default behaviors work correctly
Common Pitfalls
- Forgetting to exit impersonation before making admin changes
- Not testing all user types after permission changes
- Assuming admin access rules apply to impersonated views
Troubleshooting
Issue: No agents appear for selected user type
Issue: No agents appear for selected user type
Solutions:
- Verify the user type has agents linked via permissions
- Check that linked agents are active
- Review access control rules for the user type
Issue: Wrong agent selected by default
Issue: Wrong agent selected by default
Solutions:
- Check the default agent setting on the permission
- Verify priority numbers are set correctly
- Ensure the expected default agent is active
Issue: Impersonation doesn't reflect expected permissions
Issue: Impersonation doesn't reflect expected permissions
Solutions:
- Clear browser cache and refresh
- Verify the permission configuration is saved
- Check for conflicting access control rules
Related Documentation
- Access Control Rules - Configure who can access what
- Agent Permissions - Link agents to user types
- Agents - Agent configuration details
