Multivalued account attributes

I have a before-provisioning rule where I need to obtain the current proxyAddresses account attribute for an account in Active Directory.

The idn utility does not have a method with a signature that returns a collection.

However, it looks like the sailpoint.rule.Account object contains a Map<String, Object> of all the attributes, but I’ve no idea what to cast the value to and it’s a rather long process to set up a repro and try to get logs.

Anyone know?

Hi,

You can do like below. I have added steps on high level.

AccountRequest modifyUser = null;
List existingData = new ArrayList();
List newListdata = new ArrayList();
existingData = idn.getRawAccountAttribute(curApp, acctId, "proxyAddresses");
for(String temp: existingData){
	newListdata.add(temp);
}
AttributeRequest addAttributePA = new AttributeRequest();
addAttributePA.setName("proxyAddresses");
addAttributePA.setValue(newListdata);
addAttributePA.setOperation(sailpoint.object.ProvisioningPlan.Operation.Add);
modifyUser.add(addAttributePA);
plan.add(modifyUser);

Hope this helps.

-Abhinov

Hi,
I appreciate the example, I have a couple questions:

The docs for idn.getRawAccountAttribute indicate the source is in the format of name [source], but the AccountRequest object doesnt indicate what the following returm:

String applicationName = accountRequest.getApplicationName();
String nativeIdentity = accountRequest.getNativeIdentity();

Is the output of these suitable for input to the idn.getRawAccountAttribute call?

And lastly, what is the nuance of ProvisioningPlan.Operation.Add vs. ProvisioningPlan.Operation.Set?

I see existing code that seems to use either interchangably?

Thank you very much!

Hi,

You can get curApp and account id using below

String curApp = application.getName();
String acctId = accountRequest.getNativeIdentity();

When you create attribute request you use set.

AttributeRequest newDNAttributeRequestEA10 = new AttributeRequest();
newDNAttributeRequestEA10.setName("extensionAttribute10");
newDNAttributeRequestEA10.setValue(currEmail);
newDNAttributeRequestEA10.setOperation(sailpoint.object.ProvisioningPlan.Operation.Set);

And when you add this attribute request to account request you use add.

accountRequest.add(newDNAttributeRequestEA10);

-Abhinov

1 Like

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