site/docs/enterprise/teams.md
Promptfoo Enterprise supports a flexible role-based access control (RBAC) system that allows you to manage user access to your organization's resources.
Promptfoo Enterprise supports multiple teams within an organization. To create a team, navigate to the "Teams" tab in the sidebar and click the "New Team" button.
You can add users to a team by editing the team and clicking the "Add team members" button. This will also allow you to set the role of the user in the team.
You can also create service accounts at the team level, which will allow you to create API keys for programmatic access to Promptfoo Enterprise. These are useful for CI/CD pipelines and automated testing.
:::note Only system admins can create service accounts. :::
When using the Promptfoo CLI with multiple teams, you can control which team context your operations use:
After logging in, set your active team using:
promptfoo auth teams set "Your Team Name"
All subsequent CLI operations (evaluations, sharing results, etc.) will use this team context.
Before running important operations, verify your active team:
promptfoo auth whoami
This displays your current organization and team.
:::tip
Always verify your team context with promptfoo auth whoami before sharing evaluation results or running scans to ensure they go to the correct team.
:::
Promptfoo allows you to create custom roles to manage user access to your organization's resources. To create a role, navigate to the "Roles" tab in the sidebar and click the "New Role" button.
Promptfoo Enterprise supports the following permissions: