SRchalla
(Swathi R Challa)
May 28, 2024, 7:39pm
1
Which IIQ version are you inquiring about?
Version 8.3
Share all details related to your problem, including any error messages you may have received.
Hi Team,
As part of requirement , We need to refresh identity through a rule with setting some parameters . What are the options to achieve this?
I would be great if we can lock the identity during this execution.
Thanks
Swathi
kjakubiak
(Kamil Jakubiak)
May 28, 2024, 8:31pm
2
Hi Swati,
This code schedules identity refresh workflow execution in 5 seconds after code execution.
Date date = new Date();
date.setTime(date.getTime() + 5000);
Map<String, Object> launchArgsMap = new HashMap<>();
launchArgsMap.put("identityName", identityName);
launchArgsMap.put("workflow", "Identity Refresh");
launchArgsMap.put("processTriggers", "true");
launchArgsMap.put("promoteAttributes", "true");
launchArgsMap.put("provision", "true");
launchArgsMap.put("refreshIdentityEntitlements", "true");
launchArgsMap.put("refreshManagerStatus", "true");
launchArgsMap.put("refreshRoleMetadata", "true");
launchArgsMap.put("synchronizeAttributes", "false");
launchArgsMap.put("correlateEntitlements", "true");
launchArgsMap.put("correlateScope", "true");
launchArgsMap.put("disableIdentityProcessingThreshold", "true");
RequestDefinition def = context.getObjectByName(RequestDefinition.class, "Workflow Request");
Request request = new Request();
request.setDefinition(def);
request.setEventDate(date);
request.setName("Identity Refresh: " + identityName);
request.setAttributes(def, launchArgsMap);
RequestManager.addRequest(context, request);
}
2 Likes
ipobeidi
(Ivan Obeidi)
May 28, 2024, 8:32pm
3
in 5 seconds? so we are all refreshing right now?
nice.
kjakubiak
(Kamil Jakubiak)
May 28, 2024, 8:33pm
4
Good one get ready for refresh let me be more correct
Edit:
@ipobeidi hope better now
3 Likes
iamksatish
(Satish Kurasala)
May 28, 2024, 8:34pm
5
Use below sample code
import sailpoint.api.Identitizer;
import sailpoint.object.Identity;
import sailpoint.object.Attributes;
String idenName="<Your User Name>";
Identity identity = context.getObjectByName(Identity.class, idenName);
Map map = new HashMap();
map.put("promoteAttributes",true);
map.put("refreshManagerStatus",true);
map.put("refreshIdentityEntitlements",true);
Attributes attr=new Attributes()
attr.setMap(map);
// Add any other attributes of refresh task , get the names from debug page
Identitizer identitizer = new Identitizer( context, map );
identitizer.refresh(identity);
context.saveObject(identity);
context.commitTransaction();
7 Likes
Remold
(Remold Krol)
June 3, 2024, 8:01pm
6
Hi @SRchalla ,
Have you tested the code provided by Satish?
If it answers your query, would you be so kind to mark Satish reply as solution?
This will help other users to quickly find the answer to your question if the have exactly the same question
– Remold
2 Likes
it is showing error like below
Constructor error: Can’t find constructor: sailpoint.api.Identitizer(sailpoint.server.InternalContext, java.util.HashMap) in class: sailpoint.api.Identitizer :
iamksatish
(Satish Kurasala)
June 17, 2024, 10:36am
8
@SindhujaGalam
Welcome to the Community.
Please use the updated code with Attributes.
2 Likes
system
(system)
Closed
August 16, 2024, 10:37am
9
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.