Click or drag to resize
Galactic API

User Class

User is a class that allows for the query and manipulation of Active Directory user objects.
Inheritance Hierarchy

Namespace:  Galactic.ActiveDirectory
Assembly:  Galactic.ActiveDirectory (in Galactic.ActiveDirectory.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax
public class User : SecurityPrincipal, IComparable<User>, 
	IEqualityComparer<User>

The User type exposes the following members.

Constructors
  NameDescription
Public methodUser(ActiveDirectory, SearchResultEntry)
Gets a user object from a supplied search result entry.
Public methodUser(ActiveDirectory, Guid)
Gets a user object from Active Directory with the supplied GUID.
Top
Properties
  NameDescription
Public propertyBadPasswordCount
The number of times the user has entered a bad password. Returns a negative number is there is an error retrieving the value.
Public propertyBadPasswordTime
The last time that the user entered a bad password when authenticating to AD.
Public propertyCommonName
The Common Name (CN) of the object in Active Directory.
(Inherited from ActiveDirectoryObject.)
Public propertyCreateTimeStamp
The time the object was created in UTC.
(Inherited from ActiveDirectoryObject.)
Public propertyDepartment
The Department the user belongs to.
Public propertyDescription
A description of the security principal.
(Inherited from SecurityPrincipal.)
Public propertyDisplayName
The user's display name.
Public propertyDistinguishedName
The Distinguished Name (DN) of the object in Active Directory.
(Inherited from ActiveDirectoryObject.)
Public propertyDivision
The user's division in the organization.
Public propertyEMailAddress
The principal's e-mail address.
(Inherited from SecurityPrincipal.)
Public propertyEmailAddresses
A list of the principal's e-mail addresses.
(Inherited from SecurityPrincipal.)
Public propertyEmployeeId
The Employee Id of the user.
Public propertyEmployeeNumber
The employee number of the user.
Public propertyExchangeAlias
The principal's Microsoft Exchange Alias.
(Inherited from SecurityPrincipal.)
Public propertyFirstName
The user's first name.
Public propertyFTPDirectory
The FTP Directory for the user off the FTP root.
Public propertyFTPRoot
The root directory for FTP access by the user.
Public propertyGroups
The distinguished names of groups that this principal is a member of.
(Inherited from SecurityPrincipal.)
Public propertyGUID
The GUID of the object in Active Directory.
(Inherited from ActiveDirectoryObject.)
Public propertyHomeDirectory
The path to the user's home directory.
Public propertyHomeDrive
The user's home drive letter.
Public propertyHomePage
The user's home page URL.
Public propertyIsDisabled
Whether the user's account is disabled in Active Directory.
Public propertyIsGroup
Indicates if this principal is a Group.
(Inherited from SecurityPrincipal.)
Public propertyIsUser
Indicates if this principal is a User.
(Inherited from SecurityPrincipal.)
Public propertyLastName
The user's last name.
Public propertyLogonScript
The path to the user's logon script.
Public propertyManager
The distinguished name of the user's Manager.
Public propertyMustChangePasswordAtNextLogon
Whether the user has to change their password at their next logon.
Public propertyOrganizationalUnit
The distinguished name of the organizational unit or parent object containing the object.
(Inherited from ActiveDirectoryObject.)
Public propertyPasswordExpired
Whether the user's password has expired.
Public propertyPasswordLastSet
The date and time that the user's password was last site.
Public propertyPhoneNumber
The user's telephone number.
Public propertyPrimaryEmailAddress
The principal's primary e-mail address.
(Inherited from SecurityPrincipal.)
Public propertySAMAccountName
The principal's SAM Account Name.
(Inherited from SecurityPrincipal.)
Public propertySchemaClasses
The schema class types that identify the type of object this is in Active Directory. Examples: group, user, etc.
(Inherited from ActiveDirectoryObject.)
Public propertySecurityIdentifier
The user's security identifier (SID).
Public propertyStreetAddress
The user's street address.
Public propertyTargetAddress
The principal's target e-mail address. Used by Exchange for routing e-mail to its final destination which may lie outside of the organization. Allows for an object to appear in the GAL even though its e-mail address may be outside of Exchange. Also used when routing e-mail to the Microsoft Office365 cloud from an on-premises Exchange server.
(Inherited from SecurityPrincipal.)
Public propertyTitle
The user's title.
Public propertyUserAccountControl
Gets the user's UserAccountControl property. A return of 0 means there was an error retrieving the property.
Public propertyUserAccountControlComputed
Gets the user's computed UserAccountControl property. A return value of 0 means it wasn't computed.
Public propertyUserPrincipalName
The User Principal Name of the principal.
(Inherited from SecurityPrincipal.)
Top
Methods
  NameDescription
Public methodAddProxyAddress
Adds a proxy e-mail address to the account's proxyAddresses field.
(Inherited from SecurityPrincipal.)
Public methodAddToGroup
Adds this principal to the supplied group.
(Inherited from SecurityPrincipal.)
Public methodCompareTo(ActiveDirectoryObject)
Compares this ActiveDirectoryObject to another ActiveDirectoryObject.
(Inherited from ActiveDirectoryObject.)
Public methodCompareTo(SecurityPrincipal)
Compares this SecurityPrincipal to another SecurityPrincipal.
(Inherited from SecurityPrincipal.)
Public methodCompareTo(User)
Compares this User to another User.
Public methodStatic memberCreate
Creates a new user within Active Directory given it's proposed name, the distinguished name of the OU to place it in, and other optional attributes.
Public methodDeleteAttribute
Deletes values from an attribute.
(Inherited from ActiveDirectoryObject.)
Public methodDisable
Disables the user's account for authentication if it is enabled.
Public methodEnable
Enables the user's account for authentication if it is disabled.
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEquals(ActiveDirectoryObject, ActiveDirectoryObject)
Checks whether x and y are equal (using GUIDs).
(Inherited from ActiveDirectoryObject.)
Public methodEquals(SecurityPrincipal, SecurityPrincipal)
Checks whether x and y are equal (using GUIDs).
(Inherited from SecurityPrincipal.)
Public methodEquals(User, User)
Checks whether x and y are equal (using GUIDs).
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberGetAllUsers
Gets all users in the Active Directory.
Public methodGetByteAttributeValue
Gets the first byte array value from the supplied attribute of the object.
(Inherited from ActiveDirectoryObject.)
Public methodGetByteAttributeValues
Gets all byte array values from the supplied attribute of the object.
(Inherited from ActiveDirectoryObject.)
Protected methodGetEntryFromAD(Guid)
Gets new data for the object from AD and places the values in the entry variable within the object.
(Inherited from ActiveDirectoryObject.)
Protected methodGetEntryFromAD(Guid, ListString)
Gets new data for the object from AD and places the values in the entry variable within the object.
(Inherited from ActiveDirectoryObject.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetHashCode(ActiveDirectoryObject)
Generates a hash code for the ActiveDirectoryObject supplied.
(Inherited from ActiveDirectoryObject.)
Public methodGetHashCode(SecurityPrincipal)
Generates a hash code for the SecurityPrincipal supplied.
(Inherited from SecurityPrincipal.)
Public methodGetHashCode(User)
Generates a hash code for the User supplied.
Public methodGetIntervalAttributeValue
Gets the UTC DateTime from a Interval attribute.
(Inherited from ActiveDirectoryObject.)
Public methodStatic memberGetModifiedUsers
Gets of all user accounts that were modified within the specified time frame.
Public methodGetStringAttributeValue
Gets the first string value from the supplied attribute of the object.
(Inherited from ActiveDirectoryObject.)
Public methodGetStringAttributeValues
Gets all string values from the supplied attribute of the object.
(Inherited from ActiveDirectoryObject.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodMemberOfGroup
Checks if this principal is a member of the supplied group.
(Inherited from SecurityPrincipal.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMoveRename
Moves and / or renames this object.
(Inherited from SecurityPrincipal.)
Public methodRefresh
Refreshes the object to retrieve any changes made to attributes since creation.
(Inherited from ActiveDirectoryObject.)
Public methodRemoveFromGroup
Removes this principal from the supplied group.
(Inherited from SecurityPrincipal.)
Public methodRemoveProxyAddress
Removes a proxy e-mail address from the account's proxyAddresses field.
(Inherited from SecurityPrincipal.)
Public methodRemoveUserAccountControlFlag
Removes a flag from the user's User Account Control attribute.
Public methodSetAttribute
Sets attribute of an object. If a null or empty values object is supplied no modifications will be made.
(Inherited from ActiveDirectoryObject.)
Public methodSetPassword
Sets the password of the user.
Public methodSetPrimaryProxyAddress
Sets the supplied e-mail address to be the primary e-mail address for receiving mail. Note: This e-mail address must already be associated with the account. If there is account currently has a primary e-mail address, it will be set as a secondary.
(Inherited from SecurityPrincipal.)
Public methodSetStringAttribute
Sets a single value string attribute of an object. If a null or empty value is supplied, the attribute will be cleared / deleted.
(Inherited from ActiveDirectoryObject.)
Public methodSetUserAccountControlFlag
Sets a flag in the user's User Account Control attribute.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnlock
Unlocks the user's account if it is locked.
Top
Fields
  NameDescription
Protected fieldAD (Inherited from ActiveDirectoryObject.)
Protected fieldAdditionalAttributes (Inherited from ActiveDirectoryObject.)
Protected fieldStatic memberAttributeNames
The list of specific attributes that should be retrieved when searching for the entry in AD. The attributes of parent objects should be included as well.
Protected fieldAttributes (Inherited from ActiveDirectoryObject.)
Protected fieldEntry (Inherited from ActiveDirectoryObject.)
Protected fieldJAN_01_1601 (Inherited from ActiveDirectoryObject.)
Top
See Also