To get Workgroup Names without using any filter condition

Which IIQ version are you inquiring about?

Version 8.3

Share all details related to your problem, including any error messages you may have received.

I want to implement projection queries to fetch the workgroup name instead of the workgroup object by modifying the below lines of code

import sailpoint.object.Identity;
import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
import java.util.List;
List wrkgmemnberList = new ArrayList();
QueryOptions qo = new QueryOptions();
List<Identity> workGroups = context.getObjects(Identity.class,qo);
for(Identity ident : workGroups)
	System.out.println("Workgroup name - "+ident.getName()+"\nMembers");
	Identity workgroup = context.getObjectByName(Identity.class, ident.getName());
      Iterator wrkGrpmembers = ObjectUtil.getWorkgroupMembers(context, workgroup, null);
        Object[] object = (Object[]);
        Identity ids = (Identity) object[0];
        System.out.println(ids.getName()+" - "+ids.isInactive());

code to get workgroup names only.

List wrkgNames = new ArrayList();
  QueryOptions qo = new QueryOptions();

  List props = new ArrayList();
  Iterator it =, qo, props);

  while (it.hasNext()) {
    String name = (String)((Object[])[0];

  return wrkgNames;

The code which I have provided is using the projection search , its not storing the workgroup object. its just pulling the name of workgroup from the database and storing in this and then returning.

Iterator it =, qo, props);

The method search(java.lang.Class<T> cls, QueryOptions options, java.util.List<java.lang.String> properties)

Performs a projection search for selected object properties and return an iterator.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.