Yes, the User API's can do this, but an easier way would be to use the CLI (Platform API CLI (genesys.cloud)) and run this command:
gc users list --autopaginate | jq -r ".[] | [.name, .id] | @csv" > output.csv
To get it by a queue, you need to use the routing API/CLI and put in the queue GUID.
gc routing queues members list {QUEUEID} --autopaginate | jq -r ".[] | [.name, .id] | @csv" > output.csv
------------------------------
Robert Wakefield-Carl
ttec Digital
Sr. Director - Innovation Architects
Robert.WC@ttecdigital.comhttps://www.ttecDigital.comhttps://RobertWC.Blogspot.com------------------------------