Custom Workflows (Workgroup via REST API using GET method)

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.

  1. I need a custom workflow code to get all workgroup names alone without using any filter

  2. I need a custom workflow code, when we pass the workgroup name as a filter, I should get all workgroup basic details as the response (name, id, description)

  3. I need a custom workflow code to get all workgroup names and provide the ability to filter them.

As a starting point
You can use the below code to fetch all the workgroup details along with members in IIQ -

import sailpoint.object.Identity;
import sailpoint.object.QueryOptions;
import sailpoint.object.Filter;
import java.util.List;
  
List wrkgmemnberList = new ArrayList();
QueryOptions qo = new QueryOptions();
qo.addFilter(Filter.eq("workgroup",Boolean.TRUE));
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());
    if(workgroup.isWorkgroup())
    {
      Iterator wrkGrpmembers = ObjectUtil.getWorkgroupMembers(context, workgroup, null);
      while(wrkGrpmembers.hasNext())
      {		
        Object[] object = (Object[]) wrkGrpmembers.next();
        Identity ids = (Identity) object[0];
        wrkgmemnberList.add(ids.getName());  
        System.out.println(ids.getName()+" - "+ids.isInactive());
      }	
    }
}

Mark it as solution, if it solved your problem.

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