Refresh Identity via rule

Hi All!
I have 2 use cases and need some help.

  1. Refreshing identities after provisioning
    I see two options for refreshing identities after provisioning:
  • setDoRefresh(boolean b)
  • setRefreshOptions(java.util.Map options)
    My question is:
  • Can I just use setDoRefresh(true) or do I always need to set setRefreshOptions as well?
  • If setDoRefresh(true) is enough, what refresh options are enabled by default when I call it?
  1. Refreshing identities outside of provisioning.
    If I need to refresh identities outside of provisioning, how can I do that programmatically via code?

Hi @kpudasaini,

in both cases you can launch the refresh task via code refreshing the identity(or the identies) that want.
There are various ways to do it, you can launch in sync or after your rule.
Also, you can use the configuration that you have saved on the Refresh Task or setting another configuration.
On this page you can find how configure it and some example.

1 Like

@kpudasaini
If you spectical about options doing via OOTB doRefresh , you can use below code to refresh the identity and add the options of refresh as per your choice within the code itself, this should resolve your issue

import sailpoint.api.Identitizer;
import sailpoint.object.Identity;
import sailpoint.object.Attributes;

String idenName="SampleIdentity";
Identity identity = context.getObjectByName(Identity.class, idenName);
Map map = new HashMap();
// Add the refresh options whatever you want ( you can get keys from debug page of refresh task
map.put("promoteAttributes",true);
map.put("refreshManagerStatus",true);
map.put("refreshIdentityEntitlements",true);

Attributes attr=new Attributes();
attr.setMap(map);

Identitizer identitizer = new Identitizer(context,attr );  

identitizer.refresh(identity);


context.saveObject(identity);

context.commitTransaction();
3 Likes

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