How to List all roles using mmctl or command line?

I would like to assign user roles, however I don’t know the roles that I am able to assign. Is there a way to list all the roles in Mattermost using the mmctl or mattermost commandline tool? What about via database SQL query perhaps? Thanks in advanced.

Hi tman,

just stumbled upon your posting and saw that noone answered so far :frowning:
mmctl does not support that, but there’s an API call for that:

https://api.mattermost.com/#tag/roles/operation/GetAllRoles

And you can use the following DB Query:

mattermost=# select displayname,permissions from roles where deleteat=0;
               displayname                |                                                                                                         permissions
------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 authentication.roles.playbook_admin.name |  playbook_private_manage_members playbook_private_manage_properties playbook_private_manage_roles playbook_public_make_private playbook_public_manage_members playbook_public_manage_properties playbook_public_manage_roles
[...]