Skip to main content

List all roles

You can fetch all the roles that you have created

tip

You can also view all the roles from the user management dashboard. To know more about how to manage your user roles and permissions from user management dashboard see this page

import UserRoles from "supertokens-node/recipe/userroles";

async function getAllRoles() {
const roles: string[] = (await UserRoles.getAllRoles()).roles;
}
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI