Fetch Application Users List

Fetch Application Users List

Hi,

Is there a way to fetch a complete list of all users in the application? I'm trying to develop my own approval process rather than using the in-built one and I need to send an email to all users who have the "Approver" role. Therefore I need to grab the list of users and loop through them using the thisapp.permissions.roleForUser function to retrieve their role. However, I can't find a function to list all users in the app.

Any help anyone can provide would be greatly appreciated.

Thanks,
Harry