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

Content Assist set up in Eclipse

# Open the Eclipse application # Navigate to Windows > click on Preferences # Navigate to Java and expand it # Navigate to Editor a...