Skip to main content

Overview

Roles control what each user can see and do in FinOps Hub and Embedded Banking: from expenses and invoices to payments, accounting configuration, and bank accounts. Every user has exactly one role, either system-provided or custom. The full set of permissions are documented in the Permissions reference.

System roles

Tesouro provides four built-in roles available to all organizations. They cannot be modified or deleted.
  • Company admin: full access to all operations, including user and role management
  • Finance admin: full AR/AP cycle and payments, without user management or org settings.
  • Bookkeeper: read-only access to all financial objects, with the ability to export data.
  • Employee: can manage their own expenses and receipts only.
The table below summarizes what each role can do, derived from the live permission set for each system role:
System roles cannot be modified or deleted. PATCH and DELETE requests on a system role return 403 Forbidden.
Account-gated means the Finance admin’s access to bank accounts and embedded bank accounts is limited to only the accounts explicitly granted to them. To grant or revoke a user’s access to specific bank accounts, use the Bulk update access endpoint.

Reporting manager

A reporting manager is a user relationship, not a role or permission. When a user is designated as someone’s reporting manager (via the reportingManagerId field on the user object), they automatically gain access to that person’s expense records. This is what gives expense:read:self and expense:write:self their extended reach: “self” covers the user’s own expenses plus those of their direct reports. No additional permission is required. Reporting manager access doesn’t grant approval rights. The organization’s approval policies govern those.
See Expense approval policies to configure approval rules for a reporting manager’s team.

Custom roles

Organizations can create custom roles with any combination of user-assignable permissions. Unlike system roles, custom roles can be updated and deleted.

Create a custom role

Call POST /identity/v1/roles with a partner-level access token:
The successful response returns the created role object:

Assign permissions to a custom role

After creating the role, assign permissions using POST /identity/v1/roles/{roleId}/permissions:
Returns 204 No Content on success. To remove permissions from a role, use "type": "REMOVE" with the same endpoint and the permission IDs to revoke. Permission IDs can be retrieved from GET /identity/v1/roles/{roleId}/permissions on any existing role, or from the Permissions reference.

Assign the role to a user

Assign the role to a user by setting roleId on POST /identity/v1/users (when creating a user) or PATCH /identity/v1/users/{userId} (to update an existing user). See Organization users.

Update a custom role

Call PATCH /identity/v1/roles/{roleId} with any subset of name, key, or description:

Delete a custom role

Call DELETE /identity/v1/roles/{roleId}. Returns 204 No Content on success. System roles cannot be deleted and return 403 Forbidden.
Deleting a role does not automatically reassign its members. Users who were assigned the deleted role will have no role and may lose access to the system. Reassign them to another role before or immediately after deleting.

Read role data

List members of a role

GET /identity/v1/roles/{roleId}/members returns all users currently assigned to a role. The response is paginated and supports limit and paginationToken query parameters.

List permissions on a role

GET /identity/v1/roles/{roleId}/permissions returns all permissions assigned to a role.