Share all details related to your problem, including any error messages you may have received.
Hi,
We are trying to setup an email notification, if an entitlement owner get terminated or disabled.
Want to know how to pull owner details and from the entitlement and check whether the owner is active or not, Based on the employement status an email should be notified to the adminstrators with owner and respective entitlemnet name. Any suggestions!!!
Hi Hari,
There are 2 ways how you can do that (or actualy 3).
You can implement in your leaver/disablement/termination process a check if the identity you are disabling/terminating has any ManagedAttributes owned. To check this you can just use simple query option with filters
QueryOptions qo = new QueryOptions();
qo.add(Filter.eq("owner.name",identity.getName());
Iterator it = context.search(ManagedAttribute.class,qo);
/// If it.hasNext() is true - means this identity has some entitlements otherwise not
then you can do any other logic to eg. send notification
Similar way you can build population of identities who are disabled but are assigned as owner - and send notifications on schedule to this users
Advanced policy to detect this situations and then assign the violation eg. to the manager of the owner
Thanks for your input. We already have below rule to notify when an entitlement is created, is it possible to pull the owner from managed attribute and check for the employmentstatus?
List entitlements = new ArrayList();
QueryOptions qo = new QueryOptions();
Date last1DayDate = new Date();
last1DayDate = DateUtils.addDays(last1DayDate, -1);
qo.addFilter(Filter.gt("created", last1DayDate));// Filter to Get entitlements created in last 1 day
IncrementalObjectIterator managedAttrsIterator = new IncrementalObjectIterator(context, ManagedAttribute.class, qo);
while (managedAttrsIterator.hasNext()) {
ManagedAttribute managedAttr = (ManagedAttribute) managedAttrsIterator.next();
if(managedAttr.getDisplayName() != null ){
entitlements.add(managedAttr);
}
}
if (!entitlements.isEmpty()) {
sendNewAccountEmail(entitlements);
}
Hi Hari,
I believe you have 2 issues here - it should be like that (first one is that getEmploymentStatus method does not exist - you have to take it from the regular attributes map, second is that to execute equals you forgot a dot.
Its the exact code, I tried to pass the identity name in to the variable identity. But in our case it should check all the identity who are marked as entitlement owner and applies filter to the same.
We have similar scenario in the IdentityIQ environment.
what we are doing is in Termination workflow process we check if the user who is getting terminated is owner of any roles or workgroups or any objects then update these objects to set the terminated users manager as the owner and send an email at the end to the manager in the workflow process. This way no terminated users will be part of any role or workgroup objects.
In the workflow we have rules to determine the logic of who is the next owner and send email accordingly.
Thanks for your inputs, Do we need to create a new variable under termination workflow?
How to find if the user is owner of any entitlements/roles is there any sample method available?