9.1.1 IADsUser

The IADsUser interface is used to get and set the properties of the User object. The interface definition is as follows:

[ object, uuid(IID_IADsUser), oleautomation, dual ]

interface IADsUser: IADs

{

// Read-only properties.

[propget]

HRESULT BadLoginAddress ([out, retval]BSTR *pbstrBadLoginAddress);

[propget]

HRESULT BadLoginCount ([out, retval]long *plBadLoginCount);

[propget]

HRESULT LastLogin ([out, retval]DATE *pdateLastLogin);

[propget]

HRESULT LastLogoff ([out, retval]DATE *pdateLastLogoff);

[propget]

HRESULT LastFailedLogin ([out, retval]DATE *pdateLastFailedLogin);

[propget]

HRESULT PasswordLastChanged ([out, retval]DATE *pdatePasswordLastChanged);

//

// Read/write properties

[propget]

HRESULT Description ([out, retval]BSTR *pbstrDescription);

[propput]

HRESULT Description ([in]BSTR bstrDescription);

[propget]

HRESULT Division ([out, retval]BSTR *pbstrDivision);

[propput]

HRESULT Division ([in]BSTR bstrDivision);

[propget]

HRESULT Department ([out, retval]BSTR *pbstrDepartment);

[propput]

HRESULT Department ([in]BSTR bstrDepartment);

[propget]

HRESULT EmployeeID ([out, retval]BSTR *pbstrEmployeeID);

[propput]

HRESULT EmployeeID ([in]BSTR bstrEmployeeID);

[propget]

HRESULT FullName ([out, retval]BSTR *pbstrFullName);

[propput]

HRESULT FullName ([in]BSTR bstrFullName);

[propget]

HRESULT FirstName ([out, retval]BSTR *pbstrFirstName);

[propput]

HRESULT FirstName ([in]BSTR bstrFirstName);

[propget]

HRESULT LastName ([out, retval]BSTR *pbstrLastName);

[propput]

HRESULT LastName ([in]BSTR bstrLastName);

[propget]

HRESULT OtherName ([out, retval]BSTR *pbstrOtherName);

[propput]

HRESULT OtherName ([in]BSTR bstrOtherName);

[propget]

HRESULT NamePrefix ([out, retval]BSTR *pbstrNamePrefix);

[propput]

HRESULT NamePrefix ([in]BSTR bstrNamePrefix);

[propget]

HRESULT NameSuffix ([out, retval]BSTR *pbstrNameSuffix);

[propput]

HRESULT NameSuffix ([in]BSTR bstrNameSuffix);

[propget]

HRESULT Title ([out, retval]BSTR *pbstrTitle);

[propput]

HRESULT Title ([in]BSTR bstrTitle);

[propget]

HRESULT Manager ([out, retval]BSTR *pbstrManager);

[propput]

HRESULT Manager ([in]BSTR bstrManager);

[propget]

HRESULT TelephoneNumber ([out, retval]VARIANT *pvarTelephoneNumber);

[propput]

HRESULT TelephoneNumber ([in]VARIANT varTelephoneNumber);

[propget]

HRESULT TelephoneHome ([out, retval]VARIANT *pvarTelephoneHome);

[propput]

HRESULT TelephoneHome ([in]VARIANT varTelephoneHome);

[propget]

HRESULT TelephoneMobile ([out, retval]VARIANT *pvarTelephoneMobile);

[propput]

HRESULT TelephoneMobile ([in]VARIANT varTelephoneMobile);

[propget]

HRESULT TelephonePager ([out, retval]VARIANT *pvarTelephonePager);

[propput]

HRESULT TelephonePager ([in]VARIANT varTelephonePager);

[propget]

HRESULT FaxNumber ([out, retval]VARIANT *pvarFaxNumber);

[propput]

HRESULT FaxNumber ([in]VARIANT varFaxNumber);

[propget]

HRESULT OfficeLocations ([out, retval]VARIANT *pvOfficeLocations);

[propput]

HRESULT OfficeLocations ([in]VARIANT vOfficeLocations);

[propget]

HRESULT PostalAddresses ([out, retval]VARIANT *pvAddresses);

[propput]

HRESULT PostalAddresses ([in]VARIANT vAddresses);

[propget]

HRESULT PostalCodes ([out, retval]VARIANT *pvPostalCodes);

[propput]

HRESULT PostalCodes ([in]VARIANT vPostalCodes);

[propget]

HRESULT SeeAlso ([out, retval]VARIANT *pvSeeAlso);

[propput]

HRESULT SeeAlso ([in]VARIANT vSeeAlso);

[propget]

HRESULT AccountDisabled ([out, retval]boolean *pbAccountDisabled);

[propput]

HRESULT AccountDisabled ([in]boolean bAccountDisabled);

[propget]

HRESULT AccountExpirationDate ([out, retval]DATE *pdateAccountExpirationDate);

[propput]

HRESULT AccountExpirationDate ([in]DATE dateAccountExpirationDate);

[propget]

HRESULT GraceLoginsAllowed ([out, retval]long *plGraceLoginsAllowed);

[propput]

HRESULT GraceLoginsAllowed ([in]long lGraceLoginsAllowed);

[propget]

HRESULT GraceLoginsRemaining ([out, retval]long *plGraceLoginsRemaining);

[propput]

HRESULT GraceLoginsRemaining ([in]long lGraceLoginsRemaining);

[propget]

HRESULT IsAccountLocked ([out, retval]boolean *pbIsAccountLocked);

[propput]

HRESULT IsAccountLocked ([in]boolean bIsAccountLocked);

[propget]

HRESULT LoginHours ([out, retval]VARIANT *pvLoginHours);

[propput]

HRESULT LoginHours ([in]VARIANT vLoginHours);

[propget]

HRESULT LoginWorkstations ([out, retval]VARIANT *pvLoginWorkstations);

[propput]

HRESULT LoginWorkstations ([in]VARIANT vLoginWorkstations);

[propget]

HRESULT MaxLogins ([out, retval]long *plMaxLogins);

[propput]

HRESULT MaxLogins ([in]long lMaxLogins);

[propget]

HRESULT MaxStorage ([out, retval]long *plMaxStorage);

[propput]

HRESULT MaxStorage ([in]long lMaxStorage);

[propget]

HRESULT PasswordExpirationDate ([out, retval]DATE *pdatePasswordExpirationDate);

[propput]

HRESULT PasswordExpirationDate ([in]DATE datePasswordExpirationDate);

[propget]

HRESULT PasswordMinimumLength ([out, retval]long *plPasswordMinimumLength);

[propput]

HRESULT PasswordMinimumLength ([in]long lPasswordMinimumLength);

[propget]

HRESULT PasswordRequired ([out, retval]boolean *pbPasswordRequired);

[propput]

HRESULT PasswordRequired ([in]boolean bPasswordRequired);

[propget]

HRESULT RequireUniquePassword ([out, retval]boolean *pbRequireUniquePassword);

[propput]

HRESULT RequireUniquePassword ([in]boolean bRequireUniquePassword);

[propget]

HRESULT EmailAddress ([out, retval]BSTR *pbstrEmailAddress);

[propput]

HRESULT EmailAddress ([in]BSTR bstrEmailAddress);

[propget]

HRESULT HomeDirectory ([out, retval]BSTR *pbstrHomeDirectory);

[propput]

HRESULT HomeDirectory ([in]BSTR bstrHomeDirectory);

[propget]

HRESULT Languages ([out, retval]VARIANT *pvLanguages);

[propput]

HRESULT Languages ([in]VARIANT vLanguages);

[propget]

HRESULT Profile ([out, retval]BSTR *pbstrProfile);

[propput]

HRESULT Profile ([in]BSTR bstrProfile);

[propget]

HRESULT LoginScript ([out, retval]BSTR *pbstrLoginScript);

[propput]

HRESULT LoginScript ([in]BSTR bstrLoginScript);

[propget]

HRESULT HomePage ([out, retval]BSTR *pbstrHomePage);

[propput]

HRESULT HomePage ([in]BSTR bstrHomePage);

[propget]

HRESULT Picture ([out, retvalVARIANT *pvarPicture);

[propput]

HRESULT Picture ([in]VARIANT varPicture);

// Methods.

HRESULT Groups ([out, retval]IADsMembers **ppGroups);

HRESULT SetPassword ([in]BSTR bstr NewPassword);

HRESULT ChangePassword ( [in]BSTR bstrOldPassword

[in]BSTR bstrNewPassword);

};

Method

Syntax

Description

BadLoginAddress

NetAddress

Gets the address of last node that is considered an Intruder (kept if Intruder detection is active).

BadLoginCount

Integer

If Intruder detection is active, gets the number of bad logon attempts since the last reset time.

LastLogin

Time

Gets the time and date of last network logon.

LastLogoff

Time

Gets the time and date of last network logoff.

LastFailedLogin

Time

Gets the time and date of last failed network login.

PasswordLastChanged

Time

Gets the last time the password was changed.

Groups

Method

Returns a collection of Group objects representing the groups that this user is a member of.

Description

String

Gets and sets the text description of the user.

Country

String

Gets and sets the reference to the country.

Division

String

Gets and sets the division within a company (organization).

Department

String

Gets and sets the department (OU) within the company to which the user belongs.

DepartmentNumber

String

Gets and sets department's charge number, e.g., 4911-19.

EmployeeID

String

Gets and sets the user's employee ID.

FullName

String

Gets and sets the user's full name.

FirstName

String

Gets and sets the user's first name.

LastName

String

Gets and sets the user's last name.

OtherName

String

Gets and sets an additional name (for example, middle name) for the user

NamePrefix

String

Prefix for the user's name, for example "Ms.", "Hon."

NameSuffix

String

Suffix for the user's name, for example "Jr.", "III".

Title

String

Gets and sets the user's title.

Manager

String

Gets and sets the user's manager.

TelephoneNumber

List

Gets and sets an array of (usually work-related) telephone numbers associated with the user

TelephoneHome

List

Gets and sets an array og home telephone numbers for the user

TelephoneMobile

List

Gets and sets an array of mobile telephone numbers for the user

TelephonePager

List

Gets and sets an array of pager numbers for the user

FaxNumber

List

Gets and sets the fax number associated with the user.

OfficeLocations

List

Gets and sets an array of BSTR user locations.

PostalAddresses

List

Gets and sets an array of BSTR postal addresses, multivalued in the case where the user has more than one address. The internal format of a Postal Address should comply with CCITT F.401 as referenced in X.521-1993, which defines a PostalAddress as 6 elements of 30 bytes each, holding a street address, (optionally) Post Office Box, city or locality, state or province, Postal Code, and Country. .

PostalCodes

List

Gets and sets an array of BSTR postal codes..

SeeAlso

List

Gets and sets an array of Active Directory Paths of other objects related to this user.

AccountDisabled

Boolean

Gets and sets if the account is or should be disabled.

AccountExpirationDate

Time

Gets and sets the date and time after which the user cannot log in.

GraceLoginsAllowed

Integer

Gets and sets the number of times the user can log on after the password has expired.

GraceLoginsRemaining

Integer

Gets and sets how many grace logons are left before the account is locked.

IsAccountLocked

Boolean

Gets and sets if account is locked because of intruder detection.

LoginHours

OctetString

Gets and sets time periods for each day of the week during which logons are permitted for the user. Represented as a table of Booleans for the week, each indicating if that time slot is a valid logon time.

LoginWorkstations

List

Gets and sets an array of BSTR addresses (or names) of workstations and net numbers at which the user can log on.

MaxLogins

Integer

Gets and sets the number of simultaneous login sessions allowed.

MaxStorage

Integer

Gets and sets the maximum amount of disk space a user can have. Expressed in KBytes.

PasswordExpirationDate

Time

Gets and sets the date and time at which the password expires.

PasswordMinimumLength

Integer

Gets and sets the minimum password length.

PasswordRequired

Boolean

Gets and sets if the password is required.

RequireUniquePassword

Boolean

Gets and sets if a new password must be different than those known through a password history.

EmailAddress

EmailAddress

Gets and sets the user's e-mail address.

HomeDirectory

Path

Gets and sets the user's home directory.

Languages

List

Gets and sets an array of BSTR language names for the user.

Profile

Path

Gets and sets the path of user's profile.

LoginScript

Path

Gets and sets the logon script path.

HomePage

String

Gets and sets a string containing the URL of a home page for this user.

Picture

OctetString

Gets and sets array of bytes that hold an image.

Groups

Method

Returns a collection of Group objects representing the groups that this user is a member of.

SetPassword

Method

Sets the user's password to a specified value.

ChangePassword

Method

Changes the user's password from the specified old value to a new value.