Search code examples
identitysailpoint

How to disable account of identity in Sailpoint via java API?


I am working on JDBC provisioning where create and delete operation is working fine. Now I am trying disable operation which is nothing but updating the status as disable in the db, which is also working fine but account is not getting disabled, it is showing "disable pending" for the account. Hence I am not able to try enable operation on the account.

I even triedaccount.setDisabled(true); for the account via account API. So I was planning to disable Identity which will in turn will disable account and I can try on Enable operation.

I could not see any button to disable user from IIQ may be I need to enable some quicklink for that. I need help related to the same.


Solution

  • Disabling an identity ideally corresponds to termination use case. How is your identity cubes created in IIQ? Is that through any HR source aggregation? if so, you should look for an attribute which tells if the user is active or terminated. Based on that, you need to set 'true' to OOTB identity attribute 'inactive'.

    If cubes are created through some other manual process like self-registration or manager initiated user create etc. then that needs to be handled in workflow code to set the above attribute value to 'true' when termination request is initiated.

    you can use build map rule for the same

    import sailpoint.connector.JDBCConnector;
    import sailpoint.connector.Connector;
    import java.util.HashMap;
    
    HashMap map=JDBCConnector.buildMapFromResultSet(result);
    
    System.out.println("Inside Build Map Rule");
    if(schema.getObjectType().compareTo(Connector.TYPE_ACCOUNT)==0)
    {
        System.out.println("TYPE_ACCOUNT");
    
        String active=map.get("status");
    
        System.out.println("Status : " + active);
    
        if(active.equals("Disabled"))
        {
            map.put("IIQDisabled","true");
    
            System.out.println("Set IIQDisabled = True");
        }
        else if (active.equals("Enabled"))
        {
            map.put("IIQDisabled","false");
    
            System.out.println("Set IIQDisabled = False");
        }
    }
    
    return map;