Custom Assertion plugin can achieve complicated use case. However needs to be compiled with upgrades and maintained which adds to overhead.
If Each Application has a dedicated group prefix, expression can filter using the prefix and send only the groups which match the prefix string. This is something to consider to migrate away from Custom AGP and use OOB feature.
Here is an example from the thread https://communities.ca.com/thread/241696397; this would only return groups which match the string APP1 and APP2, instead of returning all groups which user belongs to.
Create Attribute Mapping (Virtual Attribute) using this Expression |
---|
Filter(ENUMERATE(Get('isMemberOf'), STRING(RDN(STRING(%0), FALSE))), '*APP1*') + "^" + Filter(ENUMERATE(Get('isMemberOf'), STRING(RDN(STRING(%0), FALSE))), '*APP2*') |