JDBC : How to update the auto generated native identity

Hello All,

How can we set the native identity of an account in a JDBC connector during Access Request where the native Identity value is generated post query/storedproc execution via OUTPUT parameter.

Thanks

Hi @pritishmhrn,

native identity is the identity who account is correlated and when you create an access request, you do it on identity.

Somehow the access request fails during PIRM task as it is unable to match an account which it provisioned.

Can you upload the logs or share more info?

Also, it could be if you build manually the request in a provisioning rule. If you have you need to add native itendity to prov.plan. Like this:

plan.setNativeIdentity()

Do you mean the update fails? If yes can you share the error / logs.

Hi @pritishmhrn,

Your use-case is the map the value that is coming as OUTPUT value from stored proc?

Have you given thought to post provisioning rule?

If there is some specific error that you are getting then let us know.

Thanks

Hi @pritishmhrn ,

Basically, you can do whatever you want to do on the account level while provisioning in the application in the Before provisioning rule or After provisioning rule (it is up to you to use what and how you want to use). But before that, check the plan (just print the plan in the rule and check logs) in the rule to see if whatever value you are expecting is coming or not. If yes, then make use of it and add it as a native identity. I have added the below code. You can change according to your requirements.

if ( accReq.getOp() == ObjectOperation.Create  )
{
  if(null == accReq.getNativeIdentity()){
    AttributeRequest emailAddReq = accReq.getAttributeRequest("email");
    String nativeIdentity = emailAddReq.getValue(context);
    accReq.setNativeIdentity(nativeIdentity);
    plan.add(accReq);
  }
}
1 Like

Hi @pritishmhrn

If you are using MSSQL you can execute a select query to return the index count and add 1 to that value.

select (max( ident_current(‘dbo.table’)) + 1) as id;

MS doc:

This will help to ensure the if the provisioning policy is triggered more than once this value does not increment more than once:
Solved: Maintaining field values between compilations - Compass (sailpoint.com)

I was getting the user id via Output parameter, which I added to my provisioning result. Retrieved the user id from provisioning result in JDBC global provisioning rule and the native Identity of the account request and it worked. The access request got updated with native identity and PIRM task succeeded. Thank you!

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