How to Read all agent of a Agent Grroup (or Group Target)

Hi all,

i’m using the 7.6 psdk api and i need to read on configuration server all information regarding all agent contained into a VAG or GT.

I think that i need to do 2 different requests (RequestReadObject), one for retrieving the VAG (CfgAgentGroup) and the 2nd request for filtering the agent (CfgPerson).
Can anybody suggest me a way for retrieve agents information throught a single request? I’m evaluating also a possibile upgrade of the psdk api.

Thanks a lot,

FABIO

do not know PSDK 7.6 a lot, but within latest PSDK versions you can use CfgQuery and get/filter data at one “place”. Try to read doc about it.

Hi Fabio,

I am using a later version of the psdk but this is how we retrieve the agent username from a particular VAG:

CfgAgentGroupQuery agentGroupQuery = new CfgAgentGroupQuery(_confService);
agentGroupQuery.Name = vagid;
CfgAgentGroup agentGroup = _confService.RetrieveObject(agentGroupQuery);
List agentList = new List();
foreach (var agent in agentGroup.Agents)
agentList.Add(agent.UserName);
return agentList;

Hope that helps,
Kerry.

Thank you so much for your replies.
I’ve decided to upgrade psdk for using confservice and CfgQueries as you suggest me.
Thank you!
Fabio