> For the complete documentation index, see [llms.txt](https://docs.digitalsamba.com/reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalsamba.com/reference/sdk/methods/listusers.md).

# listUsers()

Returns an array of the current users inside the room.

<pre class="language-javascript"><code class="lang-javascript">let users = sambaFrame.listUsers();
console.log('There are', users.length, 'users inside the room:');
console.log(users);

/*Here is how the array looks like:
<strong>[
</strong>    {
        "id": "08c82f56-c670-4d36-bfe3-87a8cd0f7f29",
        "name": "John",
        "avatarColor": "#90c695",
        "role": "moderator",
        "kind": "local"
    },
    {
        "id": "15a0b10d-5f0f-47a9-9889-1d92651aa6d8",
        "name": "Lucas",
        "avatarColor": "#3498db",
        "role": "moderator",
        "deviceType": "desktop",
        "kind": "remote"
    }
]*/
</code></pre>

**Sample use case**: \
You want to have a list of the current users participating in the room.

{% hint style="info" %}
Look at the [usersUpdated](/reference/sdk/events/usersupdated.md) event if you want to subscribe to an always up-to-date array of the users inside the room.
{% endhint %}
