I would like to exclude entitlements and certain technical roles from a certification campaign.
To do this, I built the following query filter:
((NOT _exists_:privileged) AND (@accessModelMetadata(key:"roleRoleTechnique" AND value:"oui")))
NOT exists:privileged: excludes entitlements
@accessModelMetadata(key:“roleRoleTechnique” AND value:“oui”): excludes technical roles
The issue I’m facing is that when I use @accessModelMetadata, access profiles are also being excluded — even though they shouldn’t be — because accessModelMetadata is not part of the access profile data model.
I tried combining the @accessModelMetadata clause with conditions to check for access profiles field, but access profiles are still being excluded whenever @accessModelMetadata is present.
I’m currently considering using tags as an alternative, but that would require significant updates and administrative work.
This is due to the use of NOT with exists keyword as the search returns access items and identities with access items. Privileged is a boolean flag for entitlements and therefore make use of it in defining search query – either value as false or true. Also, make sure you are mapping the key and value with the right field (like key is the technical name of the attribute and name is the display name of the attribute)