$users= \Bitrix\Main\UserTable::getList(
[
'select' => [
'ID', 'ACTIVE', 'EMAIL',
'GROUP_ID' => 'GROUP.GROUP_ID',
],
'runtime' =>
[
new Bitrix\Main\Entity\ReferenceField(
'GROUP',
'\Bitrix\Main\UserGroupTable',
[ '=this.ID' => 'ref.USER_ID' ],
[ 'join_type' => 'LEFT' ]
),
],
]
)->fetchAll();