Roles
This guide shows how to create roles and assign them to users from the Dashboard. Once assigned, you can read those roles in your app with the SDK Roles guide.
Prerequisites
Before you begin, make sure you have:
- A Block-Auth company account (tenant workspace).
- At least one linked and validated application.
If you have not completed this setup yet, follow the Integration Quickstart first.
1. Create a role
Open Users management in the sidebar and select the Roles tab.

Click Add role, enter a name and a description, then click Create. Spaces and symbols other than - and _ are removed from the name.
Block-Auth gives each role a slug, shown under its name in the list (for example acme-x7k2p9). Use that slug in your code, for example hasRoleBySlug('acme-x7k2p9'): unlike the name, it never changes.

2. Assign a role to a user
Switch to the Users tab. Find the user you want to update and choose Assign role in the Actions column.

In the modal, select the role you want to assign and click Assign.

The user will receive the assigned role on their next sign-in. To use roles in your application code, continue with SDK Roles.

