Expand my Community achievements bar.

SOLVED

Group members aren't found for certain group(s) via API

Avatar

Level 2

For sending emails we retrieve the members of a group.

 

See attached WorkspaceService.java:
The OID is retrieved via method findGroupOID
This groupId is set in GroupMembershipSearchFilter to the GroupMembershipSearchFilter
With lcConnector.getDirectoryManager().findGroupMembers we retrieve the users in the group for this group the members aren't found.

When retrieving the group via findGroupMembers the members of the group aren't found when the PricipalReference.status = Obsolete of that group.

 

See attached:
For IT_PM_BStatusObsolete.png and IT_PMStatusObsolete.png it's not working because PricipalReference.status = Obsolete
For PMG_MCX_N_CHNStatusCurrent.png it's working this group has PricipalReference.status = current

 

Renaming a group with PricipalReference.status = Obsolete from IT PM to IT PM AAAAAA changes the status from Obsolete to current,
see attachment IT_PM_AAAAAA.
Renaming back from IT PM AAAAAA back to IT PM changes the status to OBSOLETE again.
Attached also an overview of groups starting with IT PM (itPMGroups.png)

 

Can somebody help me with this issue:
- Why is the PricipalReference.status obsolete and not when renaming?
- Am I using the API call's incorrectly?

1 Accepted Solution

Avatar

Correct answer by
Level 2

In the end we solved the issue:
1) The property setMatchExactCriteria should be set as first which wasn't the case
PrincipalSearchFilter psf = new PrincipalSearchFilter();
// setMatchExactCriteria must be set first otherwise it won't work
psf.setMatchExactCriteria(true);

2) When maintaining PM Groups the group can be returned more times with
PrincipalReference.status OBSOLETE added a filter on PrincipalReference.status CURRENT

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @willw34480670 
Are you using AEM services to send email?

Which Adobe product/application API are you using?



Arun Patidar

Avatar

Level 2

Hi Arunpatidar,

 

No we're only retrieving the members of a group to find the email addresses, the emails are sent in a custom applications.

We're using AEM.6.5.20 

 

 

 

Avatar

Correct answer by
Level 2

In the end we solved the issue:
1) The property setMatchExactCriteria should be set as first which wasn't the case
PrincipalSearchFilter psf = new PrincipalSearchFilter();
// setMatchExactCriteria must be set first otherwise it won't work
psf.setMatchExactCriteria(true);

2) When maintaining PM Groups the group can be returned more times with
PrincipalReference.status OBSOLETE added a filter on PrincipalReference.status CURRENT