Support Article
How to delete many users?
SA-711
Summary
Administrators need to clean up a large number of old users (operators) across multiple PRPC environments.
It can be done manually, but it will be very time consuming. Is there a better way?
Could an Activity read a file with the usernames? Alternatively, how do I give the Activity the input for the userids?
Resolution
Operator ids need to be deleted with caution, if the operators have any work objects which are in flight, you could end up with stale/orphaned work objects not available for further actions.
The recommendation is that operator ids be disabled rather than deleted, which also maintains an audit trail.
The PRPC v6.2 Developer Help provides further information on what is entailed in "disabling" an operator id:
More about Operator ID data instances
https://pdn.pega.com/sites/default/files/help_v62/procomhelpmain.htm#data-/data-admin-/data-admin-operator-/data-admin-operator-id/related.htm
For environments where the audit trail or other work objects may not be of importance (e.g. Development, Test etc.), where you may need to remove the same set of operators in multiple environments, an Activity containing a processing loop which uses an obj-open-by-handle to get the operator, followed by an obj-delete of said operator object may be viable. This assumes that the list of operators to remove is available in machine-readable form and that you first fully test the processing in a suitable environment to your satisfaction.
For example, use a File Listener to read in the file may be an option.
Please see this PDN article:
How to parse a Comma-Separated-Values (CSV) file using a file service
https://pdn.pega.com/integration/how-to-parse-a-comma-separated-values-csv-file-using-a-file-service
You should consider disabling any automated operator deletion mechanism to avoid inadvertent or accidental use.
Published June 12, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.