Monday, August 23, 2021

How to find the number of workgroups and Identities in IIQ?

import sailpoint.object.Filter;

import sailpoint.object.QueryOptions;


QueryOptions qOptions = new QueryOptions();

qOptions.addFilter(Filter.eq("workgroup",false));

int numberOfIdentities = context.countObjects(Identity.class, qOptions);


QueryOptions qOptions = new QueryOptions();

qOptions.addFilter(Filter.eq("workgroup",true));

int numberOfWorkGroups = context.countObjects(Identity.class, qOptions);


String message = "No of identities : "+numberOfIdentities+" No of workgroups : "+numberOfWorkGroups;

log.debug("message : "+message);

Thursday, August 19, 2021

Custom logger classes in IIQ?

 logger.WFLog.name=sailpoint.WorkflowTrace

logger.WFLog.level=trace


 logger.RoleLifecycler.name=sailpoint.api.RoleLifecycler

logger.RoleLifecycler.level=trace


 logger.Workflower.name=sailpoint.api.Workflower

logger.Workflower.level=trace



IIQ Console commands

# ./iiq console -j 

# Display the list of console commands:     help (or) ?

# Exit the from IIQ console  quit

# Delete all identities except spadmin from the IIQ console: delete identity * 

# Export a  single object from the IIQ console using the checkout command:

checkout workflow "Provisioning Approval Subprocess" workflow.xml -clean

# Run the task from the IIQ console using the run command: run "Mighty Run Rule Task"

# Export an object from the IIQ console:

export -clean /usr/binrootsh/Desktop/apps.xml application

# Display the "Test" rule object in XML: get rule TestRule

# list the object: list rule Test*

# To export a single object from the  IdentitytIq console to a file:    
checkout application "Time Tracking" /usr/binrootsh/Desktop/Clarity.xml -clean

# To export an object from the file to an  IdentitytIq console: 
import /usr/binrootsh/Desktop/timetracking.xml

# To run the rule from the IdentityIQ console, use the below command:
rule MightyPedia-Test /bpr/bprasad/LookupRuleArgs.xml

# The Version line lists the IdentityIQ version, patch version, and the build: about
 (./iiq console ---> about)

#  The connectorDebug command will iterate through all accounts for the application:    connectorDebug LDAP iterate 

#  The connectorDebug command will iterate through all groups for the application:    
connectorDebug LDAP iterate group 


How to validate Entitlement in Entitlement Catalog?

 

import sailpoint.object.ManagedAttribute;

Boolean entitlementCheck(){

boolean existingEnt = false;

String appName = "SAP";

String entDN = "CN=abc, OU=Pedia, DC=com";

String cn = "Java";

String displayName = null;

Filter managedAttrFilter = Filter.eq("application.name", appName);

managedAttrFilter = Filter.and(managedAttrFilter, filter.eq("value", entDN));

ManagedAttribute managedAttribute = context.getUniueObject(ManagedAttribute.class, managedAttrFilter);

if(managedAttribute != null){

displayName = managedAttribute.getDisplayName();

if(displayName.equals(cn))

existingEnt= true;

}

return existingEnt;

}

Fetch Members from Workgroup

  import java.util.ArrayList;   import java.util.Iterator;   import java.util.List;   import sailpoint.api.ObjectUtil;   import sailpoint.ob...