List users

Find the users in your organization and offices that can be assigned to cases.

Users with access to the whole organization are listed under the organization’s users. Users restricted to specific offices are listed only under each office’s users, so read both lists to find everyone who can be assigned. Pass a user’s id in assignedUsers when creating a case, and only assign users where canBeAssignedToCases is true.

Required scope: read-only

Request

query listUsers {
  me {
    accessibleOrganizations {
      organizationId
      name
      users {
        id
        name
        emailAddress
        disabled
        canBeAssignedToCases
      }
      offices {
        key
        name
        users {
          id
          name
          emailAddress
          disabled
          canBeAssignedToCases
        }
      }
    }
  }
}

Response

{
  "data": {
    "me": {
      "accessibleOrganizations": [
        {
          "organizationId": "3f2b8c1e9a4d4e7f8b6c5d4e3f2a1b0c",
          "name": "Harbour View Legal",
          "users": [
            {
              "id": "1042",
              "name": "Sarah Mitchell",
              "emailAddress": "sarah.mitchell@example.com",
              "disabled": false,
              "canBeAssignedToCases": true
            },
            {
              "id": "1063",
              "name": "Priya Shah",
              "emailAddress": "priya.shah@example.com",
              "disabled": false,
              "canBeAssignedToCases": false
            }
          ],
          "offices": [
            {
              "key": "8e7d6c5b4a3f4e2d9c1b0a9f8e7d6c5b",
              "name": "Auckland",
              "users": [
                {
                  "id": "1057",
                  "name": "Tom Walker",
                  "emailAddress": "tom.walker@example.com",
                  "disabled": false,
                  "canBeAssignedToCases": true
                }
              ]
            }
          ]
        }
      ]
    }
  }
}