List of agents

Hi,

does anybody knows how to get the list of agents for the current organisation?

if I use this code (amsc is the AMStoreConnection):

AMOrganizationalUnit ou = amsc.getOrganizationalUnit("ou=People,o=EnterpriseSample,dc=myorganisation,dc=fr");

Iterator usersdn = ou.getUserDNs().iterator();

It works fine, I can get the list of all users (4)

but if I use this, it doesn't work (0 users)

AMOrganizationalUnit ou = amsc.getOrganizationalUnit("ou=agents,dc=myorganisation,dc=fr");

Iterator usersdn = ou.getUserDNs().iterator();

[631 byte] By [sheepsa] at [2007-11-27 8:59:07]
# 1

Ok, I've found that this piece of code works:

try {

AMIdentityRepository idrepro = new AMIdentityRepository(token, "");

IdSearchControl idctrl = new IdSearchControl();

IdSearchResults idsres = idrepro.searchIdentities(IdType.AGENT, "*", idctrl);

Iterator identitites = idsres.getSearchResults().iterator();

} catch (SSOException ex) {

ex.printStackTrace();

} catch (IdRepoException ex) {

ex.printStackTrace();

}

sheepsa at 2007-7-12 21:26:07 > top of Java-index,Web & Directory Servers,Directory Servers...