GetWindowsUserByPath

Returns a Windows user object given the path to the object.

Syntax

IUser GetWindowsUserByPath(string path)

Parameter

Specify the following parameter when using this method:

Parameter Description
path The LDAP path or distinguished name of the user object you want to retrieve.

Return value

The user object as:

Centrify.DirectControl.API.IUser

Exceptions

GetWindowsUserByPath throws an ArgumentException if the path is null or empty.

Discussion

This method returns the user object using the LDAP path or distinguished name of the object. The LDAP path to a user object uses the following format:

LDAP://[domain/]attr=name,[...],dc=domain_part,[...]

The method returns the user object as Centrify.DirectControl.API.User.ObjectName. For example, if the Active Directory user account is Jae Smith and the LDAP path to the account is CN=Jae Smith, CN=Users, DC=ajax, DC=org, the method returns the user object as:

Centrify.DirectControl.API.User.Jae Smith