Platform SDK: Active Directory, ADSI, and Directory Services |
The property methods of the IADsUser interface get or set the properties described in the following table. For more information, see Interface Property Methods.
Property | Description |
---|---|
AccountDisabled
[Visual Basic] [C++] |
A flag to indicate if the account is or should be disabled. |
AccountExpirationDate
[Visual Basic] [C++] |
The date and time after which the user cannot log in. |
BadLoginAddress
[Visual Basic] [C++] |
The last node that is considered a possible intruder (available if Intruder detection is active). |
BadLoginCount
[Visual Basic] [C++] |
The number of bad logon attempts since the last reset. |
Department
[Visual Basic] [C++] |
The department, an organizational unit (OU), within the company to which the user belongs. |
Description
[Visual Basic] [C++] |
The text description of the user. |
Division
[Visual Basic] [C++] |
The division within a company (organization). |
EmailAddress
[Visual Basic] [C++] |
The user's e-mail address. |
EmployeeID
[Visual Basic] [C++] |
The employee identifier of the user. |
FaxNumber
[Visual Basic] [C++] |
The fax numbers of the user. In Active Directory, this property is single valued and the VARIANT array has one element. |
FirstName
[Visual Basic] [C++] |
The first name of the user. |
FullName
[Visual Basic] [C++] |
The full name of the user. |
GraceLoginsAllowed
[Visual Basic] [C++] |
The number of times the user can log on after the password has expired. |
GraceLoginsRemaining
[Visual Basic] [C++] |
The number of grace logons left before the account is locked. |
HomeDirectory
[Visual Basic] [C++] |
The user's home directory. |
HomePage
[Visual Basic] [C++] |
The Uniform Resource Locator (URL) for the user's home page. |
IsAccountLocked
[Visual Basic] [C++] |
A flag indicating if the account is locked because of intruder detection. |
Languages
[Visual Basic] [C++] |
An array of BSTR language names for the user. |
LastFailedLogin
[Visual Basic] [C++] |
The date and time of the last failed network login. |
LastLogin
[Visual Basic] [C++] |
The date and time of the last network login. |
LastLogoff
[Visual Basic] [C++] |
The date and time of the last network logoff. |
LastName
[Visual Basic] [C++] |
The user's last name. |
LoginHours
[Visual Basic] [C++] |
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. |
LoginScript
[Visual Basic] [C++] |
The logon script path. |
LoginWorkstations
[Visual Basic] [C++] |
Addresses or names of workstations, of the BSTR data type, from which the user can log on. |
Manager
[Visual Basic] [C++] |
The manager of the user. |
MaxLogins
[Visual Basic] [C++] |
The number of simultaneous login sessions allowed. |
MaxStorage
[Visual Basic] [C++] |
The maximum amount of disk space, in kilobytes, that the user can have. |
NamePrefix
[Visual Basic] [C++] |
Name prefix of the user, for example "Ms.", or "Hon." |
NameSuffix
[Visual Basic] [C++] |
Name suffix of the user, for example "Jr.", or "III". |
OfficeLocations
[Visual Basic] [C++] |
Office location as a BSTR array for the user. For Active Directory, this property is single-valued and the array has one element. |
OtherName
[Visual Basic] [C++] |
An additional name, for example, the middle name, for the user. |
PasswordExpirationDate
[Visual Basic] [C++] |
The date and time when the password expires. |
PasswordLastChanged
[Visual Basic] [C++] |
The last time the password was changed. |
PasswordMinimumLength
[Visual Basic] [C++] |
The minimum password length. |
PasswordRequired
[Visual Basic] [C++] |
A flag indicating if the password is required. |
Picture
[Visual Basic] [C++] |
An OctetString array of bytes that hold an image. |
PostalAddresses
[Visual Basic] [C++] |
Postal address as a BSTR array. This property is multi-valued to hold more than addresses of the user. The internal format of a PostalAddress should comply with CCITT F.401 as referenced in X.521-1993, which defines a PostalAddress as six elements of 30 bytes each, holding a street address, (optionally) Post Office Box, city or locality, state or province, Postal Code, and Country. |
PostalCodes
[Visual Basic] [C++] |
Postal codes as a BSTR array. Postal codes are positionally linked to the PostalAddresses array. In Active Directory, however, this property is single-valued and the array has a single element. |
Profile
[Visual Basic] [C++] |
The path to the user profile. |
RequireUniquePassword
[Visual Basic] [C++] |
A flag indicating if a new password should be different from those known through a password history. |
SeeAlso
[Visual Basic] [C++] |
An array of ADsPaths of other objects related to the user. |
TelephoneHome
[Visual Basic] [C++] |
An array of home telephone numbers of the user. In Active Directory, this property is single-valued and the array has one element. |
TelephoneMobile
[Visual Basic] [C++] |
An array of mobile telephone numbers of the user. In Active Directory this property is single-valued and the array has one element only. |
TelephoneNumber
[Visual Basic] [C++] |
An array of (usually work-related) telephone numbers associated with the user. In Active Directory this property is single-valued and the array is of a single element. |
TelephonePager
[Visual Basic] [C++] |
An array of pager numbers of the user. In Active Directory this property is single-valued and the array is of a single element. |
Title
[Visual Basic] [C++] |
The title of the user. |
The WinNT provider supplied by Microsoft does not support all the IADsUser property methods as presented above. However, the provider supports other properties that can be accessed using the IADs::Get or IADs::Put method. For the list of unsupported properties, code examples, and other information, see WinNT User Object in ADSI WinNT Provider.
The ADSI LDAP provider specific features of the user class object is discussed in LDAP User Object in ADSI LDAP Provider. The topic includes Mapping between IADsUser Properties and Active Directory Properties, as well as code examples for managing user account.
The following Visual Basic code snippet shows how to bind to a user account object and retrieve the user's full name.
Dim usr As IADsUser Set usr = GetObject("WinNT://Microsoft/JSmith,user") fulNamb = usr.FullName
The following C++/C code snippet shows how to bind to a user account object and retrieve the user's full name.
IADsUser *GetUserObject(LPWSTR uPath) { IADsUser *pUser; HRESULT hr = ADsGetObject(uPath,IID_IADsUser,(void**)&pUser); if (FAILED(hr)) {return NULL;} BSTR bstr; hr = pUser->get_FullName(&bstr); printf("User: %S\n", bstr); SysFreeString(bstr); return pUser; }
IADsUser, Interface Property Methods, IADs::Get, IADs::Put, WinNT User Object, ADSI WinNT Provider, LDAP User Object, ADSI LDAP Provider, Mapping between IADsUser Properties and Active Directory Properties