Account Status (IIQDisabled Attribute) For Delimited File Source

Tried to make the Account Enabled or Disabled on the basis of values inside a specific column.

In the Documentation, I found that we need to use the Query to set up the state for an account.

select … case when Active=1 then ‘false’ else ‘true’ end as IIQDisabled from …

Kindly help me with a way where to attach or write down this query and make the Account Enabled or Disabled.

If possible can we connect for some time to discuss the issue?

This ticket includes a secure attachment. Use this link to access the attached files:
https://transfer.sailpoint.com/receive/?thread=XWWD-W6AZ&packageCode=S0bgxaDHhPR7LfP0mshetp0zYsmGCmm5gBAl6Clq6Mo#keyCode=j7pJxr2pp6QJBzh-v95jdUSAO0pc72VFkUKjlZNJ3Ks

Hi @Ritu_Raj
I think you have 2 options:

  1. Use a buildmap rule to properly map values to the IIQDisabled attribute: IdentityNow Rule Guide - BuildMap Rule - Compass
  2. If you use a SQL Loader connector, you can have a CASE statement (cf. SQL CASE Statement).

Manipulating data through SQL is “easy”, so my recommendation is the 2nd approach.

I tried with the Build Map Rule i.e.,

import sailpoint.connector.DelimitedFileConnector;
	 import java.util.List;
     import java.util.Map;
		Map map = DelimitedFileConnector.defaultBuildMap( cols, record );
		if(map!=null && map.isEmpty()) {
			String data =  (String) map.get("State");
			if(data !=null && data.isEmpty()) {
                 if(data.equalsIgnoreCase("ACTIVE") || data.equalsIgnoreCase("NEW")) {
                	 map.put("IIQDisabled", false);
                 }else {
                	 map.put("IIQDisabled", true);
                 }
			}
		}
		return map;

But as per the data, it is not changing.

Kindly help.

Thanks & Regards,
Ritu Raj

Hello @Ritu_Raj
Can you add IIQDisabled in your schema and add “IIQDisabled” in your CSV header, at the end and try again?

Yeah after adding it is working Fine.

Thanks for your suggestion.

I tried using the CASE WHEN but it is not working as expected. its like its ignoring any of my data and just providing the outcome of the ELSE in the query. What do i need to do to ensure it is reading the value in my file.

Hi @yannick_beot
We have a disconnected application(delimited) where the requirement is same we need to disable/enable the account in IDN based on a attribute we have as User Status where we are getting a string as a value for that as active or inactive in this case how can I control the account enabling/disabling.?

If you can give us any suggestions it would be really helpful

Thanks

1 Like

The best way is to define a BuildMap rule and compute the attribute IIQDisabled based on the status value.

I think what is wrong in your code is the “if” statement that you’ve written in Line 5.

It should be if(map!=null && !map.isEmpty()) because if you are passing data in your map then map.isEmpty() will be false and the code inside your “if” statement(Line 5) will not get executed as the condition doesn’t satisfy, thereby not updating your Map with IIQDisabled attribute.

You can also put a print Statement after your “if”(Line 5) block to print out all the key value pairs being returned through the map in your return statement.

Let me know if it works.

1 Like

Hello @yannick_beot,

Same need for us, we have a delimited file and SQL Loader connectors with columns for the status of account (A = enabled, D = disabled) in our IDN implementation.

How could we do this with IDN ? Should we use a rule ?

Thanks :slight_smile:

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