Retrieve List of users from DefaultDom using API

Avatar

Avatar

Shekh1991

Avatar

Shekh1991

Shekh1991

18-08-2014

Hello All,

I know that we get retrieve list of users from a Group using findGroupMembers(). Is there any way that I can fetch the list of users who are part of DefaultDom using adobe provided API's?

Requesting help as I am not able to find any helpful info on this.

Thanks.

View Entire Topic

Avatar

Avatar

amaini

Employee

Avatar

amaini

Employee

amaini
Employee

23-08-2014

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);

            DirectoryManagerServiceClient dirClient = new DirectoryManagerServiceClient(myFactory);

            PrincipalSearchFilter psf = new PrincipalSearchFilter();

            psf.setSpecificDomainName("DefaultDom") ;

            psf.setPrincipalType(UMConstants.PrincipalTypes.PRINCIPALTYPE_USER);

            psf.setRetrieveOnlyActive();

        

            List<PrincipalReference> principalList = dirClient.findPrincipals(psf);

            Iterator pit = principalList.iterator();

            String oid = "";

            User testUser = null;

            while (pit.hasNext()){

                 testUser = (User)(pit.next());

                 System.out.println(testUser.getCommonName());

            }