Hi Everyone,
Can anyone please share a piece of code
How to get list of all entitlements assigned to a particular identity.
Hi Everyone,
Can anyone please share a piece of code
How to get list of all entitlements assigned to a particular identity.
hi @SrikrishnaB
You can retrieve all entitlements assigned to a particular identity using BeanShell or Java within a SailPoint IdentityIQ rule or task. Here’s a basic example using BeanShell:
import sailpoint.object.Identity;
import sailpoint.object.Entitlement;
import sailpoint.object.Link;
import java.util.List;
Identity identity = context.getObjectByName(Identity.class, "identityName");
List<Link> links = identity.getLinks();
for (Link link : links) {
List<Entitlement> entitlements = link.getEntitlements();
for (Entitlement entitlement : entitlements) {
System.out.println("Entitlement: " + entitlement.getDisplayName());
}
}
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.