cancel
Showing results for 
Search instead for 
Did you mean: 

LDAP Distribution List

sudhakarpantula2
Explorer
0 Kudos

Hello,

Using the following code I was able to read the distribution list from LDAP

try {

IGroupFactory grpFact = UMFactory.getGroupFactory();

IGroupSearchFilter searchFilt = grpFact.getGroupSearchFilter();

searchFilt.setUniqueName("*", ISearchAttribute.LIKE_OPERATOR, true);

ISearchResult srchRslt = grpFact.searchGroups(searchFilt);

while(srchRslt.hasNext()) {

String uniqueID = (String)srchRslt.next();

IGroup thisGrp = grpFact.getGroup(uniqueID);

String name = thisGrp.getDisplayName();

showGroupsNode = wdContext.createShowGroupsElement();

showGroupsNode.setAllGroups(name);

wdContext.nodeShowGroups().addElement(showGroupsNode);

}

Now how do I extract the email address of the distribution group from the object thisGrp above.

Thanks,

Sudhakar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Can't u extract from IGroup (thisGrp) the users assigned to it? - using the getUserMembers(boolean)

And then extract the email from the users.

Aviad

Message was edited by:

Aviad Levy

Added the method to get users

sudhakarpantula2
Explorer
0 Kudos

Thanks Aviad for the reply. However i do not want email ids of the members of the group. I need the email id of the group itself.

If I have a distribution group called TeamA having mail id as teama@xyz.com.

TeamA is having memebers as emp1@xyz.com, emp2@xyz.com........

I want to extract the distribution list mial id which in this case is teama@zyz.com.

Former Member
0 Kudos

Hi,

The best bet is to use the getAttribute() method.

The only problem is I am not what is the name of the attribute.

Try to get all namespaces and attributes with getAttributeNamespaces() and getAttributeNames() to see if there are any matching attributes.

Notice that namespace can be null.

Aviad

sudhakarpantula2
Explorer
0 Kudos

That is my only problem too.

Let us see if anyone has actually been able to work it out.

Thanks.

Former Member
0 Kudos

Hi,

You didnt get anything on the namespaces and attributes lists?

Aviad

sudhakarpantula2
Explorer
0 Kudos

Hello,

I got the following results

name space = com.sap.security.core.usermanagement

and attributes for this name space are

attributes = uniquename and attributes = description

name space = com.sap.security.core.usermanagement.relation

and attribute for this name space is

attributes = PRINCIPAL_RELATION_MEMBER_ATTRIBUTE

Any ideas ?