Class Inheritance in the Active Directory Schema

All object classes in an Active Directory directory service schema are derived from the special class top. With the exception of top, all object classes are subclasses of another object class. For example, contact is a subclass of organizationalPerson; organizationalPerson is a subclass of person; and person is a subclass of top. The subClassOf attribute of a classSchema object is a single-valued property that indicates the immediate superclass of the class.

Some of the attribute values that define a class are inherited from its superclasses. So the contact class inherits values from its superclasses, which are the organizationalPerson, person, and top classes. A class inherits the following data from its superclasses:

  • Possible attributes: The values of the mustContain, mayContain, systemMustContain, and systemMayContain attributes of a classSchema object define a complete list of the attributes that can be set on an instance of the object class. For each object class, the values of these attributes include all of the values that are inherited from its superclasses, as well as any values that are set explicitly for the object class itself. Thus, the mustContain attribute of the organizationalPerson class includes all the mustContain values that are inherited from the person and top classes as well as any mustContain values that are set explicitly on the organizationalPerson class.
  • Possible parents in the directory hierarchy: The values of the possSuperiors and systemPossSuperiors attributes of a classSchema object define a complete list of the object classes that can contain an instance of the object class. For each object class, the values include those inherited from its superclasses, as well as those set explicitly for the object class itself.

Be aware that object class can also have many auxiliary classes, which are specified in the auxiliaryClass and systemAuxiliaryClass attributes of a classSchema object. An object class inherits mustContain, mayContain, systemMustContain, and systemMayContain values from its auxiliary classes.