IWFAdminService svc = GetAdminService();
string groupName = "Administrators";
string distinguishedGroupName = "LDAP://" + groupName;
try
{
DomainUser[] grpUsers = svc.
GetDomainGroupMembers(distinguishedGroupName);
foreach (DomainUser usr in grpUsers)
{
Console.WriteLine("User Name:{0}; Full Name:{1};", usr.UserName, usr.FullName);
}
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}
/*
This example produces the following results:
User Name:Administrator; Full Name:Administrator
User Name:vitbdc/yuvarajn; Full Name:Yuvaraj Nagarajan
*/