# dflow members:role

> Set a member role by user id.

Web page: /docs/cli/workspace/members-role/

This changes a member's role. `USER` is a `usr_…` id from `dflow members:list`. `ROLE` is `owner`, `admin`, `developer`, or `viewer`. An admin cannot change an owner. A personal workspace returns `a personal workspace is private`. The last owner cannot be demoted.

```bash
dflow members:role USER ROLE
```

## Args

`USER` is a `usr_…` id. `ROLE` is `owner`, `admin`, `developer`, or `viewer`.

## What you see

The updated email, role, and user id. An admin cannot change an owner. A personal workspace returns precondition `a personal workspace is private`. The last owner cannot be demoted.
