Skip to content
Docs

Custom Roles

A custom role sits between Employee and Company admin. It lets you hand one narrow job to a person, such as resetting passwords for their own team, without giving them the whole admin console. You make roles at Settings → Roles & features → Roles, give one to a person at Employee Management → Edit employee → Role, and the server enforces what you chose on every request.

A custom role is made of three things, and nothing else:

  • Features, which are view only. A ticked feature lets the holder open that screen and read its data. It never lets them change anything there.
  • Actions, at most four, which are the only things a holder may do.
  • A data scope, which says whose data the role covers.

Features are view only. Ticking Team Management lets the holder open the Teams screen and read it. A POST to create a team is refused with 403. To let someone change something, give them an action.

There are four actions. Each opens a fixed set of write routes and nothing more:

Action (console label) What the holder may do Where it stops
Set budgets Set an employee’s budget limits, and extend or clear a budget override Needs a Company admin of this workspace to have Budget Management (see below)
Reset passwords Reset an employee’s password and read the temporary one Never their own password
Add people Add an employee The person is always an Employee, and in the holder’s own team when the scope is Own team
Edit people Move an employee to another team, and give or take a custom role Only the team can be changed, and only inside the holder’s scope and role

The scope decides whose data the role covers. The editor labels are Own data, Own team and Whole workspace. For actions it decides which employees the holder may act on. For features it decides which rows a screen shows.

  • Only features that narrow their data can be ticked below Whole workspace. Today that is Audit Export. Every other feature shows Needs Whole workspace scope and is locked until you choose that scope.
  • A holder with Own team and Edit people cannot move people between teams. The only team they may put someone in is their own, so a move changes nothing.

Rules a holder can never break. The server refuses these whatever the role says:

  • A holder never acts on themselves for Set budgets, Edit people or Reset passwords. People change their own password the normal way.
  • A holder never acts on a Company admin or a super admin. Someone who holds an Owner or Admin workspace role counts as a Company admin here, whatever their Role column says (see the 2.0.423 release notes).
  • A holder never acts on someone whose custom role is wider than their own. This covers a role that is stored, active or parked.
  • A role is never wider than the person who made it, and never wider than a Company admin of the workspace. A feature a Company admin does not have (closed by the plan, the parent workspace or the platform) cannot go into a role.

Set budgets does not need the Budget Management tick. It needs a Company admin of the workspace to have Budget Management. The holder can then set budgets without ticking the feature. Without the tick they cannot open the budget report screens, because ticking is what grants viewing.

Thirty-three features cannot be given to a custom role yet. Each of them either has at least one read route behind its own admin check, which a custom role does not pass, or has no read route of its own at all, so a tick would show a tab that loads nothing. The editor locks them and shows Can’t be given to a custom role yet, and Start from: Company admin leaves them unticked. This is the current state, not a permanent limit, and the list shrinks as those routes learn to honor a role.

Group Features
Observe Observe Platform, AI, Explorer, Prompts, Agents topology, Evaluations, Services, Fleet, Optimize, Business, Security, Insider Risk, Risk indicators, Enforcement, Data access, Cases, Delivery, Logs
Management Usage Insights, Sub-tenants, Employee Management, API Key Management, Model Catalog, MCP Proxy, Agent Fleet, DNS Redirector
Settings Settings, Company Settings, Routing Rules, Complexity Routing, Routing Playground, Single Sign-On, Enrollment Portal

Settings (the menu and its General page), AI, Evaluations, Services and Optimize have no admin API of their own. Model Catalog and Routing Playground have write routes only (probe a model, preview a routing choice), and a custom role’s features are view only.

To let someone act on employees today, use the actions above. They do not need Employee Management ticked.

  1. Open Settings → Roles & features and choose Roles. Only a Company admin of the workspace (or a super admin) sees this page.
  2. Choose New role.
  3. Give it a Name (60 characters at most; Company admin, Employee and the other built-in names are reserved) and an optional Description.
  4. Pick Start from: Employee, Company admin, or an existing role. This only pre-ticks the boxes.
  5. Choose the Data scope, then tick Actions and Features. A locked box says why in the line beside it.
  6. Choose Create role.

Then give it to a person at Employee Management → Edit employee → Role. Custom roles appear in that list between Employee and Company admin. A person has one role at a time. Only an Employee can hold a custom role; a Company admin already has every feature.

The same through the API, as a Company admin (a super admin adds ?organizationId=):

Terminal window
# create a role
curl -s -X POST "$AW/api/admin/custom-roles" \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"name":"Team lead","description":"Resets passwords for their team",
"features":[],"actions":["reset_passwords"],"scope":"team"}'
# → 201 {"success":true,"role":{"id":"cr_…","name":"Team lead",…}}
# give it to an employee (null takes the role away)
curl -s -X PUT "$AW/api/admin/custom-roles/assign/$USER_ID" \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"roleId":"cr_…"}'

Check it worked. GET /api/admin/custom-roles lists the roles with people (how many hold each), maxRoles, used and assignments. Sign in as the holder and call a route the role allows (200) and one it does not (403). In the console, Check access on the Access view shows feature by feature what the person has and which layer closes the rest.

A Manager here is a person who looks after their own team’s budgets and passwords.

  1. Settings → Roles & features → Roles → New role.
  2. Name: Manager. Start from: Employee.
  3. Data scope: Own team.
  4. Actions: tick Set budgets and Reset passwords.
  5. Leave Features as they are. You do not need to tick Budget Management for the actions to work, but a Company admin of the workspace must have it.
  6. Create role, then assign it to each manager in Employee Management.

A Manager can then set budgets and reset passwords for the people in their own team, and for nobody else. They cannot do either for themselves, for a Company admin or for another team. They cannot open the budget report screens unless you also tick Budget Management.

Own team widens Audit export only. If you also tick Audit Export, the Manager exports their team’s requests. The Audit trail screen is part of Usage Insights, which cannot be given to a custom role yet, so a Manager sees their team’s rows in the export but not on that screen.

A plan may set Maximum roles. The number includes the two built-in roles, Company admin and Employee, so a limit of 4 leaves room for two custom roles. A super admin sets it at Platform Admin → Plans → Plan features (choose Edit features from the plan’s ⋯ menu, then Maximum roles: a whole number from 2 to 50, or empty for no limit).

A plan with no Maximum roles has no limit. Existing plans have none until someone sets one. The Roles screen shows the count (“Roles: 3 of 4”, or “no limit on your plan”), and a create past the limit is refused:

{ "error": "Your plan allows 4 roles. Remove a role or change plan.", "code": "ROLE_LIMIT_REACHED" }

When the Platform workspace’s licence covers every workspace on the deployment, the Platform plan’s limit applies to all of them.

What happens when we change to a smaller plan?

Section titled “What happens when we change to a smaller plan?”

Nobody is locked out and nobody is deleted. When the limit drops below the number of roles:

  1. The roles that fit are kept: the ones you chose with Change which roles stay, then the oldest first. The rest are parked and shown as Not in your plan.
  2. People on a parked role are moved to Employee. They keep their account, their key and their team.
  3. Every Company admin of the workspace is emailed, listing who was moved.
  4. The console shows a banner at the top (“N people were moved to Employee because your plan’s role limit changed”) with Dismiss.
  5. A parked role cannot be assigned. The API answers 409 ROLE_NOT_IN_PLAN.

Upgrading restores them. When the limit rises again the parked roles come back, and so do the people who were moved, unless someone changed that person’s role in the meantime. In that case they stay as they are now.

How does single sign-on interact with custom roles?

Section titled “How does single sign-on interact with custom roles?”

Custom roles are assigned by hand. A group mapping can give Company admin or Employee, and nothing else. Saving a mapping to Manager, Viewer or Owner is refused:

Map groups to Company admin or Employee. Custom roles are assigned by hand.

Mappings that were stored before this rule still load and behave as before. See Single Sign-On.

  • Changes reach other servers within about 10 seconds. Removing a role, editing it or taking it from someone takes effect immediately on the server that handled the change. On a deployment with several servers, the others pick it up within about 10 seconds.
  • The last save wins. If two admins edit roles in the same workspace at the same moment on different servers, the later save replaces the earlier one. Reload the Roles screen and check before editing again.
  • Becoming a Company admin clears a custom role. Whoever makes the change (an admin, a single sign-on or SCIM group mapping, or a change of workspace admin), the person’s custom role is removed and the removal is audited (custom_role.assigned, role null). Being made an Employee again later does not bring it back; give it again by hand.
  • Own team narrows Audit export only. See the Manager recipe above: no other feature that can be ticked below Whole workspace exists yet.
What you see Cause Fix
409 ROLE_LIMIT_REACHED, “Your plan allows N roles. Remove a role or change plan.” The workspace already holds as many roles as its plan allows, built-ins included Delete a role you no longer use, or ask a super admin to raise Maximum roles
409 ROLE_NOT_IN_PLAN The role is parked because the plan allows fewer roles than exist Change which roles stay, or raise the plan’s limit
400 ASSIGN_EMPLOYEES_ONLY You tried to give a custom role to a Company admin Custom roles are for Employees; a Company admin already has every feature
400 MODULE_NEEDS_WORKSPACE_SCOPE You ticked a feature that shows workspace-wide data under Own data or Own team Choose Whole workspace, or untick the feature
400 MODULE_NOT_GRANTABLE, “… can’t be given to a custom role yet.” The feature is one of the thirty-three above Untick it. Use an action if the goal is to change something
400 FEATURE_ABOVE_COMPANY_ADMIN A Company admin of this workspace does not have that feature (plan, parent workspace or platform) Open the feature for Company admins first, or leave it out
400 ACTION_ABOVE_COMPANY_ADMIN Set budgets needs Budget Management, and a Company admin of this workspace does not have it Open Budget Management for Company admins, or drop the action
403 CUSTOM_ROLE_ACTION_REFUSED, “Your role cannot do this for this person” The person is outside the holder’s scope, is the holder, is a Company admin, or holds a wider role Check the holder’s scope and the person’s team; use an admin for anyone else
403 ROLES_ADMIN_REQUIRED The caller is not a Company admin of this workspace (or a super admin) Sign in as a Company admin of that workspace
An action works but the budget screens stay hidden Set budgets opens the write routes only; viewing needs the feature tick Tick Budget Management on the role
A person lost their role after a plan change The plan’s limit dropped and their role was parked Raise the limit, or change which roles stay

No schema change. A plain image swap. Roles and their assignments live with the workspace’s other settings. Existing plans have no role limit until someone sets Maximum roles, so nothing is parked on upgrade.