2.3 Active Directory Properties

Active Directory defines a standard set of objects, properties and methods that provide a consistent view of common DS properties and operations which is independent of the underlying namespace. Active Directory exposes these standard properties and methods through standard COM Interfaces. The Active Directory Standard Interfaces provide:

Providers may expose additional objects and properties not defined by Active Directory. Properties for these objects can be exposed directly on the objects, or via additional COM interfaces.

Active Directory provides three means for accessing properties:

Approach 2, late-bound access and Approach 3, Dynamic name-bound access allow the development of completely portable programs. A client program can browse the schema, discover a property, and get or put that property by passing the property name to IDispatch::GetIdsOfNames (for C or C++) or to IADs::Get or ::Put (from any language). This will always work because the name returned from the schema is guaranteed to be usable in a ::Get or ::Put operation (subject to access checking by the underlying namespace).

Examples

Example 1: Retrieve a property directly from an object

Dim MyUser as IADsUser

Dim MyName as String

set MyUser = GetObject("NDS://MyOrg/SomeOU/JamesSmith")

MyName = MyUser.Fullname

Example 2: Retrieve a property by name from an object

Dim MyUser as IADsUser

Dim MyName as String

set MyUser = GetObject("NDS://MyOrg/SomeOU/JamesSmith")

MyName = MyUser.Get("Fullname")