After removing a user, create a playbook to replace the user with a different user in active incidents and incidents that are cleared.
After you remove a user from Cortex XSOAR, you also need to clear the data. You can decide which user can replace the deleted user. You can do this by running a command manually in the CLI or automate the process using a playbook or through server configurations.
If running a command in the CLI or in a playbook, you must set the builtin.commands.hidden.clearUsersData
server configuration to false
, otherwise the command cannot run.
Note
When clearing users data, only active incidents and incidents are cleared. Incidents that have been closed are not changed.
Any invitation created by a deleted user is removed. If the deleted user is the invitee, the invite remains in the Invites table.
Before you begin, ensure you remove the user, otherwise you may receive an error when running the playbook.
Create a list of users you want to remove.
Select
→ → → .Add a name for the list.
In the Content Type field, select Text.
Add the names of the users.
If adding multiple names use separate lines for each name.
Add the permission level.
For example, for
, you may want only read-only users to be able to see the list but for , you may want both analyst and administrator to be able to edit.Save the list.
Add the following server configurations by going to
→ → → .Key
Description
builtin.commands.hidden.clearUsersData
Set to
false
to run theclearUserData
command in the CLI and playbook. Default istrue
.server.mask.git.commits
Set to
true
to remove the users data from the git commit version that the user created (version control). For an example of version control in a playbook, see Version Control.Default is
false
.Create a playbook to remove the user's data.
Select
→Add a name for the playbook and click
.Create a Task.
In the
field, select the automation.Add the following inputs.
Argument
Description
listName
Name of the list you created in step 1.
username
The name of the replacement user. Default is admin.
listClear
Set to true to delete the list after the data is cleared. Default is false.
Save the task.
(Optional) Run the debugger to test the playbook.
Create a job to run the playbook.
Select
→ .By default, the
job is already selected.Select the time you want to run the job.
Add the Time Triggered Job Parameters.
You need to add the playbook created in step 3.
Save the job.
The next time the job is scheduled to run, the user's data is deleted.