This information isn't stored in the database, it is stored in the registry/Directory Services. The two ways I can think of to programmatically extract this data would be to either:
- Write a custom handler to retrieve the names of all of your roles from directory services, then use the telephony toolstep "Select users with role" to pull back a list of users with that role, then you could potentially write this data to a file on your ic server using file i/o tools or even potentially write this data back to a different database.
- Assuming you have an ICWS SDK license, you could write a fairly straight forward ICWS script to pull back the roles associated with your users and output it in whatever desired format you like.
Since I'm on lockdown and am struggling to occupy my free time in the evenings while my wife is watching terrible crime shows, I went ahead and made a simple python script leveraging ICWS that can output a .csv containing all of your users and what roles are associated with them (either actual or effective/inherited). It can be found here:
https://github.com/aaronlael/PyUserRolePlease read the readme before attempting to execute the file, always test things in dev first, and I offer no warranty or claims of security for the script (but it has been tested successfuly).
------------------------------
AARON LAEL
State of Utah
------------------------------
Original Message:
Sent: 03-25-2020 17:19
From: Vathsan Sarma
Subject: user name list based on "Role"
Hello
I am looking to get a dump of all users based on their "Role"
In our organization we have various roles for agent based on the line of business they they belong to ex. "Agent_Department_Name"
each of these department could have anywhere from 50 to 10 agents.
I am wondering what table name that I can look up the role<>agent co-relation.
Now I am thinking of looking this up in the database, if there is other ways please also let me know.
Thank you
#ArchitectureandDesign
#AskMeAnything(AMA)
#PlatformAdministration
------------------------------
Vathsan Sarma
Shoppers Drug Mart Corporation
------------------------------