Cannot delete a user from Orchestrator throwing error 'The user is assigned to trigger TRIGGER_NAME in folder USERNAME's workspace (#1612)'

How to overcome the error 'The user is assigned to trigger TRIGGER_NAME in folder USERNAME's workspace (#1612)' from Orchestrator when trying to delete a user from Orchestrator UI?

Issue Description:

When trying to delete a user from Orchestrator UI, error 'The user is assigned to trigger TRIGGER_NAME in folder USERNAME's workspace (#1612)' is thrown.

The back-end details for such DELETE operation /odata/Users(USER_ID) will have a status code 409 Conflict and errorCode 1612.


Error Resolution:

Approach #1: If the user credentials that has access to the USERNAME's workspace folder Triggers section is not present, assign to the user temporary or permanently the Administrator role for the user, or create a custom role that has all permissions from the Administrator role and assign it to self.

  1. Log out and log back in to Orchestrator UI so the role can reflect for the user
  2. Go to Tenant -> Folders -> Personal Workspaces
  3. Find the impacted user workspace folder in the list
  4. Start exploring -> Automations -> Triggers
  5. Delete all triggers then delete the user from Orchestrator -> Tenant -> Manage Access
  6. From Identity (Orchestrator -> Tenant -> Manage Access -> Manage Account & Groups from Tenant -> Manage Access) .

Approach #2:

Ask the already existing Orchestrator administrator user with the Administrator role to perform these steps:

  1. Orchestrator UI -> go to Tenant -> Folders -> Personal Workspaces ->
  2. Find the impacted user workspace folder in the list
  3. Start exploring -> Automations -> Triggers
  4. Delete all triggers then delete the user from Orchestrator -> Tenant
  5. Manage Access and then from Identity (Orchestrator -> Tenant -> Manage Access -> Manage Account & Groups from Tenant -> Manage Access).

Approach #3:

  1. Delete the Triggers using the Orchestrator API endpoint /odata/ProcessSchedules(TRIGGER_ID) with the method DELETE
  2. First get all the triggers from the correct workspace folder details. Get the Id value(s).

Example:

Request URL: https://YOUR_ORCHESTRATOR_URL/odata/ProcessSchedules?$top=100&$orderby=Name%20asc

Request Method: GET

X-Uipath-Organizationunitid: PERSONAL_WORKSPACE_FOLDER_ID

  1. Use the /odata/ProcessSchedules(TRIGGER_ID) endpoint for each found Id with method DELETE to delete the triggers.

Example:

Request URL: https://YOUR_ORCHESTRATOR_URL/odata/ProcessSchedules(TRIGGER_ID)

Request Method: DELETE

X-Uipath-Organizationunitid: PERSONAL_WORKSPACE_FOLDER_ID

  1. Now it should be possible to delete the impacted user from Orchestrator UI.