# IAM.ROLE.LIST

> List the names of all roles.

URL: https://docs.hotkv.com/commands/iam-role-list/

```
IAM.ROLE.LIST
```

- Group: IAM
- Complexity: O(N) where N is the number of roles
- HotKV Cloud: not available
- On-Premise: requires the enterprise-iam license feature

`IAM.ROLE.LIST` returns the name of every role, sorted. A new server has two:
`admin` and `readonly`. See [IAM.ROLE.INFO](https://docs.hotkv.com/commands/iam-role-info/index.md) for what a
role allows.

## Return value

An array of bulk strings in RESP2 and RESP3, or the error
`NOLICENSE enterprise-iam requires a HotKV license. Contact sales@hotkv.com`.

## Examples

```
127.0.0.1:6379> IAM.ROLE.LIST
1) "admin"
2) "app"
3) "readonly"
4) "reporting"
```

## Compatibility

HotKV-only command.

## See also

[IAM.ROLE.INFO](https://docs.hotkv.com/commands/iam-role-info/index.md), [IAM.ROLE.CREATE](https://docs.hotkv.com/commands/iam-role-create/index.md),
[Roles and single sign-on](https://docs.hotkv.com/operate/iam/index.md)