Share via


Subgroup Manager

The SubGroupManager object is a helper object that is used in code that determines where a user in Active Directory directory service is stored, as an aid to determining group membership.

The SubGroupManager object is a Microsoft Visual Basic ActiveX dynamic-link library (DLL) file and an associated test .exe file that takes as input the distinguished names of a user and the parent group.

Because of the effective limit of 5,000 objects per group, most groups will require a series of subgroups to fully contain the users of a large group. For example; in Membership Directory, a group named "friends" might exist with 10,000 users in the group. In Active Directory, you would create the master group "friends" and then create subgroups under this master group, which actually holds all of the users. You can identify one of these subgroups by the fact that it contains the name of the master group with a numeric suffix. For example, "friends_0001".

The following table shows the methods supported by the SubGroupManager object, and provides a description of each.

Method Description
SubGroupMembership
  • Returns as a string the Distinguished Name (DN) of the subgroup in which the user profile will be placed.
  • No operations are performed against Active Directory.
AddUserToMasterGroup
  • Determines which subgroup of the master group this user profile should be in.
  • Verifies whether the subgroup exists. If it does not exist, it creates the subgroup automatically.
  • Writes the user profile to the subgroup.
RemoveUserFromMasterGroup
  • Determines which subgroup of the master group this user profile should be in.
  • Removes the user profile from the subgroup.
IsUserOfMasterGroup
  • Determines which subgroup of the master group this user profile should be in.
  • Tests the subgroup for whether the user profile is a member; returns True if it is, False if it is not.

The SubGroupManager object is functionally complete, but it contains a hard-coded user name and password for connecting to the directory service. You will need to alter these constants, recompile, and then register the resulting DLL by using the following command:

regsvr32 subgroupmanager.dll

The ProgID for creating the SubGroupManager object is: SubgroupManagerProject.SubGroupManager.

Ee825695.note(en-US,CS.20).gif Note

  • If you change the hashing algorithm, you must make the same changes to the source code corresponding to the Migrationutil.dll file.

Copyright © 2005 Microsoft Corporation.
All rights reserved.