Skip to main content
Hi there,

I have a listbox with a list of users which retrieve from Active Directory which I want to be able to use as the destination users in the next activity. How I retrieve Active Directory user to listbox in smartform, I write code to retrieve users of specific group(IWORKS) but it fail ,it return all users of domain

ADUM.K2UserManager ADUM=new ADUM.K2UserManager();
SourceCode.K2UMI.IK2Users users;
userListAD.Items.Clear();

users=ADUM.FindSecurityUsers("KALSOFIWORKS",null,null,null,null);

if(users!= null) {
foreach(SourceCode.K2UMI.IK2User user in users)
{
userListAD.Items.Add(user.Name.ToString());
}
}
what is wrong with that code ? Can anyone help me?

Thanks & Regards
Mumtaz Alam
Please refer to the following post:
http://forum.k2workflow.com/viewtopic.php?t=65

The ADUM.dll is for internal K2.net use only and not meant for other custom solutions. This library can/will change from one version to the next and NO consideration to backward compatibility is given to this component. This was exactly what happened in the mentioned post.

To get a list of AD group members, you should use the standard .NET DirectoryServices class.

Regards,
Ockert

Reply