Role-Based Access Control
A role defines what a user can do: which resources they can access and which operations they can perform on them. Users never receive roles directly. You assign a role to a user group, and every user in that group gets its permissions.
Access Control Model
Section titled “Access Control Model”| Object | What it is |
|---|---|
| Role | Defines what is allowed: resources and operations |
| User Group | Defines who receives the permissions |
| Group Permission Entity (GPE) | Links a user group to a role and, for a Group role, to an entity group. ThingsBoard creates it when you assign a role to a user group |
Access is denied by default. A user can only do what their roles allow. If a user belongs to multiple user groups, the permissions of all their roles are combined.
Authority
Section titled “Authority”Authority defines a user’s position in the system hierarchy and determines the maximum capabilities available to that user.
Levels
Section titled “Levels”The platform supports two authority levels for your users:
| Authority level | Description |
|---|---|
| TENANT_ADMIN | Assigned to users on the Tenant level |
| CUSTOMER_USER | Assigned to users on the Customer level |
General Behavior
Section titled “General Behavior”- A user’s authority level is determined at creation time based on where in the hierarchy the user is created.
- Changing a user’s owner with Change owner changes their authority: a user moved to a customer becomes
CUSTOMER_USER, and a user moved to the tenant becomesTENANT_ADMIN.
Role Types
Section titled “Role Types”ThingsBoard supports two role types:
| Role type | Scope | Use case |
|---|---|---|
| Generic | All entities of the user group’s owner and its sub-customers | Broad administrative access |
| Group | The entities of one entity group | Segmented and isolated access |
Both the tenant and its customers create roles in Customers & users ⇾ Roles. A customer’s roles can use fewer resources than the tenant’s: see the Customer roles column in the Permissions Reference.
Generic Role
Section titled “Generic Role”A Generic role applies to all entities within the scope of the user group it is assigned to. The scope is set by the owner of the user group, not by the role:
- assigned to a tenant user group, the role applies to all entities of the tenant;
- assigned to a customer user group, it applies to the entities of that customer and its sub-customers.
The same role can be assigned to user groups of different owners, and it then grants different access to each. Generic roles don’t need entity groups.
Create Generic Role
Section titled “Create Generic Role”- Navigate to Customers & users ⇾ Roles.
- Click + Add role.
- Enter a unique Name and, optionally, a Description.
- Set Role type to Generic.
- Under Permissions, add an entry for each Resource and select its Allowed and Denied operations.
- Click Add.
A Generic role can also deny operations. Its Denied operations remove operations that the same role allows, for example All operations on All resources except Delete on Device. A denied operation takes effect only within that role: if another role of the user allows the operation, including a Group role (for the entities of its group), access is granted.
The form checks that:
- Each resource can appear in only one entry.
- Each entry needs at least one allowed or denied operation.
- An entry’s Allowed and Denied lists can’t contain the same operation. All in Allowed with specific Denied operations is fine; All in Denied can’t be combined with any Allowed operation.
- The role needs at least one allowed operation.
See the Operations Reference and the Permissions Reference for the available operations and resources.
Assign Generic Role
Section titled “Assign Generic Role”- Open the user groups:
- for your own user groups (the tenant’s, or your customer’s if you are a customer administrator), Customers & users ⇾ Users ⇾ Groups;
- for the user groups of a customer you manage, Customers & users ⇾ Customers, then the customer’s Manage customer users item ⇾ Groups.
- Open the group details.
- Go to the Roles tab.
- Click Add.
- Set Role type to Generic and select the role.
- Click Add.
The role now applies to all entities in the scope of the group’s owner.
Group Role
Section titled “Group Role”A Group role grants operations on the entities of one entity group to one user group. The GPE links the user group, the entity group, and the role, so the permissions don’t reach beyond that entity group. Group roles suit controlled access within the same tenant.
Sharing a group does not transfer ownership. Create and Delete granted through a Group role only work on groups owned by the user’s own customer or its sub-customers, so customer users cannot create or delete entities in a group shared by the tenant. See Create and Delete Require Ownership.
Create Group Role
Section titled “Create Group Role”- Navigate to Customers & users ⇾ Roles.
- Click + Add role.
- Enter a unique Name and, optionally, a Description.
- Set Role type to Group.
- Under Permissions, select the Operations (at least one).
- Click Add.
A Group role has no Resource: it applies to the entity type of the group it’s assigned to. It can use any operation except Add to Group, Remove from Group, Change owner, Claim devices, Impersonate, Assign to Tenant, and Invoke, and it has no Denied operations.
Assign Group Role
Section titled “Assign Group Role”- Navigate to the relevant entity type (e.g., Devices & assets ⇾ Devices ⇾ Groups).
- Open the target entity group details.
- Go to the Permissions tab.
- Click Add.
- Select:
- Role — the Group role;
- User group owner — the tenant or customer that owns the user group;
- User group — the target user group.
- Click Add.
The role now applies only to that entity group. You can also assign it from the user group’s Roles tab: set Role type to Group, then select the role, the Group owner, and the entity group.
Quick Share
Section titled “Quick Share”Customer, device, asset, entity view, dashboard, edge, and agent group lists have a Share icon on each row that opens a one-step sharing dialog — no separate role creation needed for common permission levels. The icon is shown to users with Create on Group Permission and is active for groups where they have Share Group. Don’t confuse it with the Make public icon, which makes the group public: hover over the row icons to check their tooltips.
- Navigate to the entity group list (e.g., Monitor ⇾ Dashboards ⇾ Groups).
- Click the Share icon on the desired group row.
- Select the Customer to share with. For tenant users, the list also includes the tenant; customer users see their own customer and its sub-customers.
- Keep All users (default), or clear it and select a User group of that customer.
- Under Permissions, select:
• Read (default) — assigns the Entity Group Read-only User role (see Other Built-in Roles)
• Write — assigns the Entity Group Write User role: All operations. Shown only if you can edit the group’s entities
• Other — select one or more named Group roles you have already created - Click Share.
ThingsBoard creates the GPE automatically. The shared group becomes visible to the selected users with the specified permission level.
You can only grant operations you hold on the group: Write requires All, and Read requires every operation of the Entity Group Read-only User role. The user group must belong to your own tenant or customer, or to one of its sub-customers.
| Approach | When to use |
|---|---|
| Quick Share (Read / Write) | Sharing a group in one step with no pre-created role |
| Quick Share (Other) | Applying a named Group role via the share dialog |
| Full role assignment (via Permissions tab) | Reusable roles shared across multiple groups or complex multi-group setups |
Default User Groups and Roles
Section titled “Default User Groups and Roles”When a Tenant or Customer is created, ThingsBoard creates two user groups with Generic roles. These defaults give you a working permission structure out of the box.
Tenant Defaults
Section titled “Tenant Defaults”| User group | Associated role | Default permissions |
|---|---|---|
| Tenant Administrators | Tenant Administrator (Generic) | All resources — All operations |
| Tenant Users | Tenant User (Generic) | Profile — All operations; All resources — Read, RPC Call, Read Credentials, Read Attributes, Read Telemetry, Read Calculated Field and Alarm Rules |
Customer Defaults
Section titled “Customer Defaults”| User group | Associated role | Default permissions |
|---|---|---|
| Customer Administrators | Customer Administrator (Generic) | All resources — All operations |
| Customer Users | Customer User (Generic) | Profile — All operations; All resources — Read, RPC Call, Read Credentials, Read Attributes, Read Telemetry |
The Tenant Administrator and Tenant User roles are system roles shared by all tenants: they don’t appear in Customers & users ⇾ Roles and can’t be edited. To give tenant users different permissions, assign your own roles to these groups or to new user groups.
The Customer Administrator and Customer User roles are shared too. The tenant’s pair serves every top-level customer, and each customer owns the pair its sub-customers use. Editing one of them changes the permissions of that user group in every customer that uses it. To change access for one customer only, assign a custom role to its user groups instead.
Each owner also has an All user group that contains every user it owns. It has no role of its own.
Other Built-in Roles
Section titled “Other Built-in Roles”ThingsBoard creates these roles the first time it needs them:
| Role | Type | Created when | Permissions |
|---|---|---|---|
| Entity Group Read-only User | Group | A group is shared with Read | Read, RPC Call, Read Credentials, Read Attributes, Read Telemetry |
| Entity Group Write User | Group | A group is shared with Write | All |
| Public User | Generic | An owner first makes a group public | Read on Dashboard, Widgets Bundle, Widget Type, and Alarm |
| Entity Group Public User | Group | An owner first makes a group public | Read, RPC Call, Read Attributes, Read Telemetry |
Both public roles belong to the public customer of the group’s owner: the tenant’s Public customer, or a [Customer] Public sub-customer for groups a customer makes public. The public customer’s Public Users group represents anyone who opens a public link.
Manage Roles
Section titled “Manage Roles”To edit a role, open it in Customers & users ⇾ Roles. The changes apply to every user group the role is assigned to. You can’t change a role’s Role type after you create it.
A role that is assigned to any user group can’t be deleted. First remove each assignment from the user group’s Roles tab or the entity group’s Permissions tab. Assignments of the public roles can’t be removed there; make the group private instead.
Operations Reference
Section titled “Operations Reference”Each permission entry in a role specifies a resource type and one or more operations:
| Operation | What it allows |
|---|---|
| All | Every operation available for the resource |
| Create | Create new entities of this resource type |
| Read | View entity details, configuration, and settings |
| Write | Modify entities and their configuration |
| Delete | Delete entities of this resource type |
| RPC Call | Send RPC commands to devices |
| Read Credentials | View device credentials, such as access tokens and keys |
| Write Credentials | Create or update device credentials |
| Read Attributes | Read client, shared, and server-side attributes |
| Write Attributes | Create or update attributes |
| Read Telemetry | Read time-series telemetry data |
| Write Telemetry | Write time-series telemetry data |
| Claim devices | Claim a tenant-owned device for the user’s customer (or a sub-customer) using the device’s claiming data, such as its secret key. Only customer users can claim. Reclaiming a device (returning it to the tenant) needs the same operation |
| Impersonate | Log in as another user (applies to the User resource) |
| Change owner | Move an entity to another owner: the tenant, a customer, or a sub-customer |
| Add to Group | Add entities to an entity group |
| Remove from Group | Remove entities from an entity group |
| Share Group | Share an entity group with another customer or user group |
| Assign to Tenant | Assign a device to another tenant (applies to the Device resource) |
| Read Calculated Field and Alarm Rules | View calculated fields and alarm rules defined on the entity |
| Write Calculated Field and Alarm Rules | Create or modify calculated fields and alarm rules on the entity |
| Invoke | Send requests to an AI model through the REST API (applies to the AI Model resource). Customer users can invoke only models with Customer access enabled |
Permissions are evaluated per resource type — you can grant Read on Device and Write on Dashboard as separate entries within the same role. For each resource, the Allowed and Denied lists offer only the operations that apply to it: for example, Profile offers only All and Write.
Create and Delete Require Ownership
Section titled “Create and Delete Require Ownership”Through a Group role, Create and Delete apply only when the entity group is owned by the user’s own customer or by one of its sub-customers. In every other case, such as a tenant-owned group shared with a customer, or a parent customer’s group shared with a sub-customer, users cannot create or delete the group’s entities, even when the role grants All. No role setting changes this.
Write, Write Attributes, and Write Telemetry have no such restriction and work on the entities of any group shared with the user.
To let customer users create and delete entities, the entities must belong to their customer: keep them in an entity group owned by that customer instead of sharing a tenant-owned group. Existing entities can be moved with the Change owner operation. See Customers for how customer ownership and sub-customers work.
Permissions Reference
Section titled “Permissions Reference”The table below lists all available resource types that can be secured using RBAC in ThingsBoard. The Customer roles column shows which resources a customer’s roles can use. Resources marked No grant customer users nothing, even in a tenant role assigned to a customer user group. Tenant roles can use all of them.
Each resource represents a platform entity or system component that supports permission-based access control. Permissions are configured within roles and determine what operations users are allowed to perform on these resources.
Some actions require permission on more than one resource before they succeed — see Cross-Resource Dependencies below.
| Resource | Description | Customer roles |
|---|---|---|
| Agent | Manage agents (see Remote Agent). Their applications have no resource of their own and follow the permissions of the agent. | No |
| Agent Application Profile | Manage application profiles: reusable application configurations deployed by agents. | No |
| Agent Group | Manage groups of agents. | No |
| Agent Profile | Manage agent profiles: how a fleet of agents is provisioned and which applications they run. | No |
| AI | Use the AI Assistant (including its solution creator) and AI dashboard generation. The only operation is All. | No |
| AI Model | Configure connections to AI providers and their models. The Invoke operation allows sending requests to a model; customer users get only Invoke, for models with Customer access enabled. | Yes |
| Alarm | View and manage platform alarms. Creating an alarm needs Read on its originator entity; setting an assignee needs Read on User. | Yes |
| All | Grants selected operations across all resources within the assigned scope. | Yes |
| API Key | Create and manage personal access tokens for the REST API. Also needs User (Write) — each key is stored on a user account. | Yes |
| API Usage State | Access API usage statistics and telemetry metrics. | No |
| Asset | Manage logical IoT entities such as facilities, vehicles, or fields. | Yes |
| Asset Group | Manage groups of assets for structured access control. | Yes |
| Asset Profile | Configure shared settings for multiple assets. | Yes |
| Audit Log | View system activity and user action history. Viewing the log of a specific entity, customer, or user also needs Read on that target. | Yes |
| Blob Entity | Manage stored binary objects used for reporting and dashboard snapshots. | Yes |
| Converter | Manage uplink and downlink data converters in integrations. | No |
| Customer | Manage customer entities within the tenant hierarchy. Customer-level white labeling also needs Read on the Customer. | Yes |
| Customer Group | Manage logical groupings of customers. | Yes |
| Dashboard | Create and manage dashboards and visualizations. | Yes |
| Dashboard Group | Manage dashboard collections. | Yes |
| Device | Manage IoT devices, telemetry, attributes, credentials, and RPC interactions. | Yes |
| Device Group | Manage groups of devices for structured segmentation. | Yes |
| Device Profile | Configure shared device behavior and settings. | Yes |
| Domain | Manage the domains used for OAuth 2.0 logins and mobile apps. Linking OAuth 2.0 clients also needs Read on each client. | Yes |
| Edge | Manage ThingsBoard Edge instances. Assigning a rule chain, integration, scheduler event, or entity group to an edge needs Edge (Write) plus Read on the assigned resource. | Yes |
| Edge Group | Manage groups of Edge instances. | Yes |
| Entity View | Provide limited exposure of device or asset data to customers. | Yes |
| Entity View Group | Manage grouped entity views. | Yes |
| Group Permission | Manage RBAC mappings between user groups, roles, and entity groups. Also needs Read on the Role and Write on the user group (and entity group, for group roles). | Yes |
| Integration | Manage external system integrations. | No |
| Mobile App | Manage mobile application configurations. | No |
| Mobile Bundle | Manage bundles of mobile applications. Linking OAuth 2.0 clients also needs Read on each client. | No |
| Notification | Manage platform notifications and delivery channels. Targeting specific users or groups also needs Read on User (and the target customer, group, or role). | No |
| OAuth 2.0 Client | Manage OAuth 2.0 client registrations used for login. | Yes |
| OTA Package | Manage firmware and software update packages for devices. | No |
| Profile | Manage personal user profile settings. | Yes |
| QR Code Widget Setting | Configure the mobile QR code shown by the related widget. Pointing it at a bundle also needs Read on the Mobile Bundle. | Yes |
| Queue | Manage rule engine processing queues. | No |
| Queue Stats | View rule engine queue statistics. | No |
| Report | Generate and manage scheduled reports. Generating a report needs Read on its source dashboard; output is stored as Blob Entities. | Yes |
| Report Template | Manage reusable report configurations. | Yes |
| Resource | Manage shared resource library files. | No |
| Role | Manage RBAC roles and permission definitions. A role takes effect once assigned through Group Permission. | Yes |
| Rule Chain | Configure data processing and automation logic. | No |
| Scheduler Event | Manage scheduled automation events. | Yes |
| Secret | Manage stored secrets — credentials and tokens referenced by other configurations. | No |
| Task | View and manage long-running background jobs and bulk operations. | Yes |
| Tenant | Manage tenant-level configuration and hierarchy. | No |
| User | Manage user accounts and access settings. | Yes |
| User Group | Manage user groups for RBAC assignments. | Yes |
| Version Control | Export and restore ThingsBoard entities using Git-based version control. Acting on the entities also needs their own resource permissions (Read to export, Create/Write to import). | No |
| White Labeling | Configure platform branding and UI customization. Customer-level branding needs Read on the Customer; login branding for a domain needs Read on the Domain. | Yes |
| Widget Type | Manage individual widget definitions in the UI library. | Yes |
| Widgets Bundle | Manage collections of widget types. | Yes |
Cross-Resource Dependencies
Section titled “Cross-Resource Dependencies”A single action often touches more than one resource, so a restricted role usually needs more than the one permission it appears to require.
A few recurring patterns explain most of them:
- Entity groups — to add or remove entities in a group you need the group permission (Add to Group / Remove from Group) and Read on each entity.
- Ownership — changing an entity’s owner needs the Change owner operation on that entity.
- Referenced entities — when one object points at another, the role also needs Read on what it points to.
- Group-based access — linking a user group to a role (Group Permission) also needs Read on the Role and Write on the user group.
- Account-attached objects — objects stored on a user account, such as API keys, also need Write on the User.
The table below lists some example actions where ThingsBoard checks a second permission before it will succeed.
| To perform this action | You also need |
|---|---|
| Create or manage a user’s API Key | Write on User |
| Create or assign an Alarm | Read on the alarm’s originator entity; Read on User when setting an assignee |
| Create a relation between two entities | Write on both entities |
| Create a calculated field or alarm rule | Read on every Customer, Asset, or Device it references |
| Generate or download a dashboard Report | Read on the source Dashboard |
| Set a tenant or customer home dashboard | Read on that Dashboard |
| Send a Notification to specific users or groups | Read on User, plus the target Customer, User Group, or Role depending on the recipient type |
| Create a Notification request | Read on each Notification target it uses |
| Configure a Domain with OAuth 2.0 Clients | Read on each OAuth 2.0 Client |
| Configure a Mobile Bundle with OAuth 2.0 Clients | Read on each OAuth 2.0 Client |
| Configure login white labeling for a Domain | Read on the Domain |
| Configure the QR code widget for a Mobile Bundle | Read on the Mobile Bundle |
| Generate an AI device dashboard | All on AI (tenant users only); Read, Read Attributes, and Read Telemetry on the Device; and Create on Dashboard |
| Assign a Role to a User Group (Group Permission) | Read on the Role and Write on the User Group (and Entity Group, for group roles) |
| Share an Entity Group | Share Group on the entity group and Create on Group Permission; with Other, Read on each role. You can only grant operations you hold on that group (Write needs All), and only to user groups of your own tenant or customer or its sub-customers |
| Add or remove entities in an Entity Group | Add to Group / Remove from Group on the Entity Group, and Read on each entity |
| Create a Device, Asset, Entity View, Customer, User, or Edge directly into an Entity Group | Read on that Entity Group |
| Change an entity’s owner | Change owner on the entity; assigning it into target groups also needs Add to Group |
| Assign a Rule Chain, Integration, Scheduler Event, or Entity Group to an Edge | Write on the Edge and Read on the assigned resource |
| View an Audit Log for a specific entity, Customer, or User | Read on that entity, Customer, or User |
| Manage White Labeling at the customer level | Read on the Customer |
| Configure self-registration with a notification recipient | Read on the Notification target |
| Export or import entities through Version Control | Read (export) or Create / Write (import) on each entity’s own resource |
Examples
Section titled “Examples”| Recipe | Role types | What it demonstrates |
|---|---|---|
| Read-only analyst | Generic | Read-only access to all tenant entities and telemetry |
| Customer scoped access | Generic | Restrict users to their own customer’s data without entity groups |
| Generic role scope | Generic | How the same role grants different access at Tenant vs. Customer level |
| Isolated device groups | Group | Per-group device access with no cross-access between user groups |
| Multi-facility access control | Generic + Group | Supervisors, facility managers, and end users across multiple buildings |
Was this helpful?