Generate password using password policy for identity during HR System aggregation
Use Password Policy tab in the Application for creating password policy, specify the conditions and create the policy. Use the below code to set random password(using policy) to the identity in Creation rule.
import sailpoint.object.Identity;
import sailpoint.object.PasswordPolicy;
import sailpoint.api.PasswordGenerator;
String policyName = “YOUR PASSWORD POLICY NAME";
PasswordPolicy policy = context.getObjectByName(PasswordPolicy.class, policyName);
String password = new PasswordGenerator(context).generatePassword(policy);
identity.setPassword(password);
Hi,
ReplyDeleteThank you for the information. How are we notifying the generated random password to the users?
thanks for the code bro.
ReplyDeleteIt worked for me