How to get group members

Hi guys

I need to know how to get group members.

I’m using

IDirectorySession session = DirectorySystemFactory.getDirectorySystem().createSession();

IDirectoryPrincipal principal = session.lookupPrincipalByName(“DEV_BPM”,IDirectoryPrincipal.TYPE_GROUP);

where DEV_BPM is a domain group.

Thanks in advance.

Best regards.

Resolved:

List o = session.getMembers(principal.getID());

for (int i = 0; i < o.size() ; i++)
o.get(i).getName());