Get Domain Users

API Type

Web Services

Description

Retrieves all the user information in the domain that AgilePoint Server connects. It could be a local Windows system user, or a domain controller on the network.

Syntax

public virtual DomainUser[] GetDomainUsers(string LDAPPath, string Filter)

Parameters

Name Description

LDAPPath

Definition:
The LDAP path to the domain.
Type
string
Allowed Values:
A valid LDAP path.

If the value is null, the AgilePoint Server machine domain will be used.

Filter

Definition:
A filter term for groups that is wildcard-enabled.
Type
string
Allowed Values:
A string in the format (name=[my wildcard filter]).

Output

Array of DomainUser objects. If the specified group does not exist, the return value is null.

Example

IWFAdminService svc = GetAdminService();
string LDAPPath = ...// for example,
LDAP://ou=Sales,dc=Frabrikam,dc=com
string Filter = ""; // All Users

try
	{
    DomainUser[] users = svc.GetDomainUsers(LDAPPath, Filter);
    foreach (DomainUser user in users)
	   {                       
       Console.WriteLine("Full Name:{0}; Login Name:{1};", user.FullName, user.UserName);
	   }
	}

catch (Exception ex)
	{
    Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
	}
	
/*
This example produces the following results:
Full Name:Manager; Login Name:Demo3\Manager;
Full Name:Marcomm; Login Name:Demo3\Marcomm;
Full Name:SharePoint Administrator; Login Name:Demo3\sp_adm;
Full Name:Sujeet Kumar; Login Name:Demo3\sujeetk;
*/

Supported Versions

3.2.0.4 and higher