Tuesday, January 2, 2024

Update Entitlement In Cataloge

import java.util.HashMap; import java.util.Map; import sailpoint.api.SailPointContext; import sailpoint.object.ManagedAttribute;

public class UpdateEntitlmentInCataloge { static SailPointContext context = null; public static void main(String[] args) { try { Map map = new HashMap(); map.put("en_US", "IAM Test group: Mighty"); ManagedAttribute managedAttribute = context.getObjectById(ManagedAttribute.class, "be19f8788ba61b15818ba16e5d0d03e4"); managedAttribute.setAttribute("description", "Updated description: Mighty"); managedAttribute.setDisplayName("IAMTest2"); managedAttribute.setValue("CN=IAMTest,OU=Standard,OU=Security,OU=Groups,DC=ls,DC=mightypedia,DC=com"); managedAttribute.setDescriptions(map); context.saveObject(managedAttribute); context.commitTransaction(); context.decache(managedAttribute); // return "Success"; } catch (Exception e) { log.error("Exception occurred : " + e.getMessage()); } } }

No comments:

Post a Comment

Fetch Members from Workgroup

  import java.util.ArrayList;   import java.util.Iterator;   import java.util.List;   import sailpoint.api.ObjectUtil;   import sailpoint.ob...