# LIST ROLES

## Syntax <a href="#synopsis" id="synopsis"></a>

```sql
[ LIST | SHOW ] [ USER ] ROLES;
```

## Description <a href="#description" id="description"></a>

List available roles within the current organization or roles granted to the authenticated user.

### Arguments

#### USER

Optionally, list roles granted to the current user.

## Examples

#### List organization roles

```sh
<no-db>/<no-store># LIST ROLES;
+------------+-------------------------------+-------------------------------+
|  Name      |  Created At                   |  Updated At                   |
+============+===============================+===============================+
| public     | 2024-05-03 04:17:51 +0000 UTC | 2024-05-03 04:17:51 +0000 UTC |
+------------+-------------------------------+-------------------------------+
| securityad | 2024-05-03 04:17:51 +0000 UTC | 2024-05-03 04:17:51 +0000 UTC |
| min        |                               |                               |
+------------+-------------------------------+-------------------------------+
| orgadmin   | 2024-05-03 04:17:51 +0000 UTC | 2024-05-03 04:17:51 +0000 UTC |
+------------+-------------------------------+-------------------------------+
| useradmin  | 2024-05-03 04:17:51 +0000 UTC | 2024-05-03 04:17:51 +0000 UTC |
+------------+-------------------------------+-------------------------------+
| sysadmin   | 2024-05-03 04:17:51 +0000 UTC | 2024-05-03 04:17:51 +0000 UTC |
+------------+-------------------------------+-------------------------------+
```

#### List user roles

```sh
<no-db>/<no-store># LIST USER ROLES;
+---------------+-------------+---------------+
|  Name         |  Is Default |  Is Inherited |
+===============+=============+===============+
| orgadmin      | false       | false         |
+---------------+-------------+---------------+
| securityadmin | false       | true          |
+---------------+-------------+---------------+
| useradmin     | false       | true          |
+---------------+-------------+---------------+
| sysadmin      | true        | true          |
+---------------+-------------+---------------+
| public        | false       | true          |
+---------------+-------------+---------------+
```
