You can use our API to get a list of all the agents which would include the Agent's IDs as well. To know more about the same you can make use of https://developers.freshdesk.com/api/#list_all_agents
If you signed up before Aug 9, 2021, please click Previous plans to view your applicable plans.