Share via


Subgroup Manager

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

It is a Visual Basic ActiveX dynamic-link library (DLL) 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 5000 objects per group, most groups will require a series of sub-groups 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 place.

  • 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 does have a hard-coded user name and password in it for connecting to the directory service. You will need to alter these constants, recompile, and then register the resulting DLL with the following command:

regsvr32 subgroupmanager.dll

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

Ee810328.note(en-US,CS.10).gif Note

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


All rights reserved.