+

Search Tips   |   Advanced Search

Remove users and groups using xmlaccess

We can remove users or groups from the HCL Portal that are no longer used or required. We can use the XML configuration interface (XML Access) to list such users and groups. We can also remove only some selected users and groups, and keep others for further use.

HCL Portal stores users and groups that exist in the user registry as entries in the database. When using the XML configuration interface or the Manage User and Groups portlet to delete users and groups, they are deleted from both the user registery and from the database. Deleting a user or group directly from the configured user registery does not remove the database entry. Also, HCL Digital Experience does not remove entries from its database when users or groups are muted in the user registery, for example, users with too many wrong password attempts. We can manually remove the users and groups from the database.

Examples

After deleting these entries using the modified XML script, all customization is lost for the deleted users and groups.To remove users and groups from the portal, proceed as follows:

  1. Make a backup copy of the portal database.

  2. To identify and list these users and groups, run an XML export and use the cleanup-users attribute.

    Specify the cleanup-users attribute with the request tag of type export, and set its value to true. You also need to set the export-users attribute to true.

    The resulting output file lists the affected users and groups with their action set to delete.

    The XML sample file CleanupUsers.xml shows an example of how we can export such users and groups. For information about the sample XML configuration files and their location, read Sample XML configuration files.

    Note: If the number of invalid users is very high, the XML export step can fail with an out-of-memory exception. For such cases, APAR PI23109 introduces a new XML element threshold. In case of such out-of-memory exceptions, add threshold="10000" to the <request ... > element in the CleanupUsers.xml script. This option limits the number of exported users to 10,000. When using this approach, repeat the export step and all following steps until the exported file contains no entries any more. We need to have APAR PI23109 or fix pack CF03 installed to use this XML element.

  3. Check the output file from the previous step and remove all users and groups that we want to keep in the portal database. For example, we might want to keep the muted users and re-enable their passwords. All users and groups that remain in the file are removed from the database in the following import step.
  4. Import the modified XML file into the portal. The portal removes all users and groups that you retained in the XML file during the previous step from the portal database.
After deleting these entries using the modified XML script, all customization is lost for the deleted users and groups.

Parent topic: Use the XML configuration command line client

References: