How to restore a deleted role and its references without scriptsIssue <!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } ul{ list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> How to restore a deleted role and its references without scripts Description When a role is accidentally deleted, a cascade deletion can occur which will remove all references to that role. Users without the role will no longer be able to access various applications, modules, data, etc. This article will instruct an administrator on how to manually restore the record and references without the use of scripts. Solution Requirements: The user performing the data restoration should have the 'admin' role.Another instance (SOT / source-of-truth) which contains the role and references must be available in order to extract this data. The 'name' of the role and it's 'sys_id' If the 'admin' role was deleted and you are unable to import the xml files to restore the data, please contact ServiceNow support. Test Case: The 'itil' role was accidentally deleted: /nav_to.do?uri=sys_user_role.do?sys_id=282bf1fac6112285017366cb5f867469 Instructions: Undelete / restore the 'itil' role: Option #1 - Open the module 'Deleted Records', open the 'itil' role record and undelete it. Option #2 - On the SOT instance, export to .xml a copy of the 'itil' role then import into the instance with the missing role. /nav_to.do?uri=sys_user_role.do?sys_id=282bf1fac6112285017366cb5f867469 Restore these references by exporting to .xml from the SOT instance then import into the instance where the deletion occurred. This will restore the core references which are needed for the role to function properly. /sys_user_role_contains_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E /sys_app_application_list.do?sysparm_query=roles%3Ditil /sys_app_module_list.do?sysparm_query=roles%3Ditil /sys_security_acl_role_list.do?sysparm_query=sys_user_role%3D282bf1fac6112285017366cb5f867469%5E /sys_user_role_contains_list.do?sysparm_query=contains%3D282bf1fac6112285017366cb5f867469%5E /pa_dashboards_permissions_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E /sys_embedded_help_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E /sys_group_has_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E /sys_ui_action_role_list.do?sysparm_query=sys_user_role%3D282bf1fac6112285017366cb5f867469%5E /sys_user_has_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E Check for any remaining references which may need to be restored. If any are found, create a new URL similar to the ones above then repeat restoration steps. This will give you all the tables which contains a field that references the Roles (sys_user_role table): /sys_dictionary_list.do?sysparm_query=internal_type%3Dreference%5Ereference%3Dsys_user_role This will give you all the tables which contains a list collector field that references the Roles (sys_user_role) table: /sys_dictionary_list.do?sysparm_query=internal_type%3Duser_roles Applicable Versions All Additional Information This list of tables that contains the references were compiled by looking at all related lists in the itil role record using these steps: 1. In a clone or restored instance containing the needed data, open the record for the role 'itil': /nav_to.do?uri=sys_user_role.do?sys_id=282bf1fac6112285017366cb5f867469 2. Right click header > 'Configure' > 'Related Lists' 3. Move all lists to the 'Right' slush bucket then click 'Save' These below are all the related lists which contain a reference to the role 'itil': /sys_user_role_contains_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E /sys_app_application_list.do?sysparm_query=roles%3Ditil /sys_app_module_list.do?sysparm_query=roles%3Ditil /sys_security_acl_role_list.do?sysparm_query=sys_user_role%3D282bf1fac6112285017366cb5f867469%5E /sys_user_role_contains_list.do?sysparm_query=contains%3D282bf1fac6112285017366cb5f867469%5E /pa_dashboards_permissions_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E /sys_embedded_help_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E /sys_group_has_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E /sys_ui_action_role_list.do?sysparm_query=sys_user_role%3D282bf1fac6112285017366cb5f867469%5E /sys_user_has_role_list.do?sysparm_query=role%3D282bf1fac6112285017366cb5f867469%5E Related KB: How to restore a deleted group and its references without scripts