JavaScript SDK returning empty queue list for secondary divisions

const client = PlatformClient.init({
clientId: process.env.GENESYS_CLIENT_ID,
clientSecret: process.env.GENESYS_CLIENT_SECRET,
baseUrl: process.env.GENESYS_BASE_URL
});

await client.login();
const queues = await client.queues.getQueues();
console.log(queues.entities.length); // Output: 5

I’m trying to pull a complete list of all queues across our organization using the Genesys Cloud JavaScript SDK. The code above works fine, but it only returns the 5 queues in the default division. We have roughly 40 queues spread across three different divisions, and I need all of them for a compliance audit script.

I’ve looked through the SDK documentation and the REST API reference. There doesn’t seem to be a simple allDivisions flag or a divisionId parameter on the getQueues method that would fetch everything at once. I know I can call getDivisions first, but looping through each division ID and calling getQueues again feels clunky. Plus, I’m not sure if I need to pass the division ID as a query parameter or if the SDK handles it differently.

Is there a cleaner way to fetch all queues without manually iterating through every division ID? Or am I stuck doing that loop? I’ve tried adding divisionId to the options object, but it throws an error about unknown properties. I’m just trying to avoid writing a massive async loop if there’s a built-in helper I missed.