Getting entitlements by Owner

Which IIQ version are you inquiring about?

8.3

I’m trying to get all entitlements by a specific owner, and I’m running into trouble. I did the standard QueryObject with the owner.name and got nothing back. I’m a little confused:

          QueryOptions qo = new QueryOptions();
          qo.addFilter(Filter.eq("owner.name", id.getName()));
          Iterator entitlements = context.search(IdentityEntitlement.class, qo);

I’m not certain if I should be using IdentityEntitlement as my class, since I thought it was a linking table, but the Entitlement class doesn’t even have an owner field.

Hi Andrew,

You have to use the ManagedAttribute class instead of IdentityEntitlement.

quick example

QueryOptions qo = new QueryOptions();
qo.addFilter(Filter.eq("owner.name", "identity name"));
Iterator entitlements = context.search(ManagedAttribute.class, qo);

Regards
Ankush