Restoring Deleted Custom Roles In UiPath Orchestrator

We have accidentally deleted two custom roles in UiPath Orchestrator. Can those Roles be restored and have the users re-assigned to them?

Accidental deletion of custom roles in UiPath Orchestrator can disrupt normal operations. Fortunately, it is possible to restore these roles and reassign users to them through database manipulation. This article will guide through the process of restoring deleted custom roles and ensuring users are correctly reassigned to them.

Prerequisites

  • Access to UiPath Orchestrator database
  • Basic knowledge of SQL queries.

Procedure

  1. Back Up the Database

Before initiating any changes, ensure back up of the database to prevent data loss or any unintentional damage during the process.

  1. Restore the Deleted Roles

To restore the deleted roles, execute an SQL query to change the `isDeleted` column value from `1` to `0`. Below is a guideline on how to perform this:

  1. Open your SQL management tool
  2. Execute the following SQL query to identify the deleted roles:
  • SELECT * FROM dbo.Roles WHERE isDeleted = 1;

  1. Note down the ID(s) of the roles wanted to restore
  2. Restore the roles by updating the isDeleted column value to 0 with the following query (replace `{Role ID}` with the actual ID of the roles):
  UPDATE dbo.Roles

  SET isDeleted = 0

  WHERE ID = {Role ID};

  1. Verify the Restoration

After executing the SQL query:

  1. Log in to the UiPath Orchestrator
  2. Navigate to the roles section and verify if the deleted roles have been restored
  3. Check if the users are reassigned to their respective roles.

Conclusion:

By changing the `isDeleted` status from `1` to `0` in the `dbo.Roles` table, restore deleted custom roles in UiPath Orchestrator, retaining the user assignments as well. It is pivotal to always back up the database before making any changes to safeguard against data loss. If done correctly, this method should help in swiftly restoring the deleted custom roles and reinstating the user assignments without any hassles.