<p>This is not possible on Craft <code>3.3.x</code> but <code>group</code> and <code>groupId</code> have been added since <code>3.4.0-beta.5</code> (<a href="https://github.com/craftcms/cms/commit/1934c38fbdaa78cb105e8ed5b9edb8bcbf4e2800" rel="nofollow noreferrer">commit</a>)</p>

<p>With the update, you can do:</p>

<pre><code>query getAllUsers{
  users(groupId:1) {
    id,
    username
  }
}
</code></pre>

<p>Or:</p>

<pre><code>query getAllUsers{
  users(group:"groupHandle") {
    id,
    username
  }
}
</code></pre>

CC BY-SA 4.0
2020-01-09T12:38:03.707Z
2020-01-09T12:38:03.707Z
Oli
<p>I want all the users but filtered by User Group:</p>

<pre><code>query getAllUsers {
  users {
    id,
    username
  }
}
</code></pre>

<p>I cannot see any query parameter on the Schema</p>

<users><graphql>
How can I retrieve Users of a specific User Group with GraphQL?
# How can I retrieve Users of a specific User Group with GraphQL?

(Asked by: username_0 on 2020-01-03)

I want all the users but filtered by User Group:
query getAllUsers {
  users {
    id,
    username
  }
}

I cannot see any query parameter on the Schema

**Tags:** users, graphql

---

## 1 answers

### Answer by username_1 on 2020-01-09. Score: 1 | Accepted answer

This is not possible on Craft 3.3.x but group and groupId have been added since 3.4.0-beta.5 (commit)
With the update, you can do:
query getAllUsers{
  users(groupId:1) {
    id,
    username
  }
}

Or:
query getAllUsers{
  users(group:"groupHandle") {
    id,
    username
  }
}


---

