# Filter for managedattribute attributes

**URL:** <https://developer.sailpoint.com/discuss/t/filter-for-managedattribute-attributes/136847>\
**Category:** IIQ Discussion and Questions\
**Tags:** search, identityiq\
**Created:** [May 22, 2025, 1:19pm UTC](https://developer.sailpoint.com/discuss/t/filter-for-managedattribute-attributes/136847 "2025-05-22T13:19:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![filip\_johansson](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/filip_johansson/32/14460_2.png) [@filip\_johansson](https://developer.sailpoint.com/discuss/u/filip_johansson)\
**Post date:** [May 22, 2025, 1:19pm UTC](https://developer.sailpoint.com/discuss/t/filter-for-managedattribute-attributes/136847/1 "2025-05-22T13:19:59Z")

</div>

## Which IIQ version are you inquiring about?

_[8.4p1]_

Hey guys,  
Is it possible to write a filter for a Managed Attribute that filters based on the attributes?

I have managed to filter on requestable and then only log those that I care about (i.e. those that have approverSpecific1 != null)

```auto
QueryOptions query = new QueryOptions();
query.addFilter(Filter.contains("ManagedAttribute.requestable", true));
 
List entitlements = context.getObjects(ManagedAttribute.class, query);
  
for(ManagedAttribute ma : entitlements) {
  if(ma.getAttribute("approverSpecific1") != null) {
  clog.debug("ma: " + ma.getAttribute("approverSpecific1"));
  }
}

```

but im wondering, can I filter directly on the approverSpecific1 attribute? Or any other attribute for that matter, for example cn?

---

<div class="post-metadata">

**Author:** ![haideralishaik](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/haideralishaik/32/20414_2.png) [@haideralishaik](https://developer.sailpoint.com/discuss/u/haideralishaik)\
**Post date:** [May 22, 2025, 1:58pm UTC](https://developer.sailpoint.com/discuss/t/filter-for-managedattribute-attributes/136847/2 "2025-05-22T13:58:18Z")

</div>

hi @filip_johansson

You’re on the right track with your current approach.

In IIQ, `QueryOptions` only supports filtering on **indexed and top-level attributes** of the object model. Unfortunately, attributes like `approverSpecific1` (which are typically stored in the `attributes` map of a `ManagedAttribute`) aren’t directly filterable in the query itself.

So no, you can’t do something like:

```auto
query.addFilter(Filter.notnull("ManagedAttribute.approverSpecific1"));

```

That won’t work because `approverSpecific1` isn’t a first-class property in the object schema — it’s just a key in a map.

Your current approach is actually the correct one:

1. Filter on something indexable (like `requestable`).
2. Loop through the results.
3. Check the custom attribute (`approverSpecific1`) in code.

If performance becomes a concern, you could consider:

- Adding a rule or task that flags or tags these attributes in a more queryable way.
- Using a custom object or extending the schema (if you’re comfortable with that level of customization).

---

<div class="post-metadata">

**Author:** ![filip\_johansson](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/filip_johansson/32/14460_2.png) [@filip\_johansson](https://developer.sailpoint.com/discuss/u/filip_johansson)\
**Post date:** [May 22, 2025, 2:12pm UTC](https://developer.sailpoint.com/discuss/t/filter-for-managedattribute-attributes/136847/3 "2025-05-22T14:12:12Z")

</div>

Thank you, that is what I figured.  
This in itself is an optimization process to populate a custom object with information regarding workgroups, their members and what entitlements they are assigned to. So this task will be running quite sparsely, the performance will likely not be a big issue.

I’ll stick to filtering on requestable for now, and if it turns out it takes way too long time, I’ll think of optimization concerns at that point. Thank you 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 21, 2025, 2:12pm UTC](https://developer.sailpoint.com/discuss/t/filter-for-managedattribute-attributes/136847/4 "2025-07-21T14:12:40Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
