Reference
Remy Reference/agent/auth.getUsersByRole
?

auth.getUsersByRole

Returns the ids of every user who holds a given role.
auth.getUsersByRole(role) → Promise<string[]>

The ids of all users who hold a role, for fanning a notification out to every admin or resolving who can approve a request. It returns ids; read the rows from the user table when you need more than the id.

Parameters
role
string
RequiredThe role id to look up.
Notify every admin
const adminIds = await auth.getUsersByRole('admin');