{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":40273,"path":"platform-security/access-control/Role-Mgmt-V2-Upgrade.md","title":null,"bundle":null,"doc_type":null,"release":null,"body":"---\ntitle: Upgrade to Contextual Security: Role Management V2\ndescription: Contextual Security: Role Management V2 is automatically installed on new instances. You can upgrade from Contextual Security: Role Management to Contextual Security: Role Management V2 to eliminate duplicate roles in the User Roles table and prevent future duplicates.\nlocale: en-US\ncanonical_url: https://www.servicenow.com/docs/r/australia/platform-security/access-control/Role-Mgmt-V2-Upgrade.html\nrelease: australia\nproduct: Access Control\nclassification: access-control\ntopic_type: task\nlast_updated: \"2026-03-12\"\nreading_time_minutes: 2\nbreadcrumb: [Contextual Security Manager, Access Control Lists \\(ACLs\\), Access Management]\n---\n\n# Upgrade to Contextual Security: Role Management V2\n\nContextual Security: Role Management V2 is automatically installed on new instances. You can upgrade from Contextual Security: Role Management to Contextual Security: Role Management V2 to eliminate duplicate roles in the User Roles table and prevent future duplicates.\n\n## Before you begin\n\nRole required: admin, security\\_admin\n\nYou must have the admin role and [Elevate to a privileged role](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/t_ElevateToAPrivilegedRole.md) to obtain the effective security\\_admin role.\n\n**Note:** Before upgrading to Contextual Security: Role: Management V2, you must enable the Audit Roles table to create audit records related to user roles. To learn more about setting the required system property, see [Enable role auditing with Contextual Security: Role Management V2](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/access-control/enable-audit-roles.md).\n\n## About this task\n\nThis procedure describes how to upgrade your Contextual Security role and how to activate the related plugins described in the following table.\n\n<table id=\"table_jpm_rh3_hy\"><thead><tr><th>\n\nPlugin\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nContextual Security: Role Management V2\\[com.glide.role\\_management.inh\\_count\\]\n\n</td><td>\n\nPrevents duplicate entries in the User Roles \\[sys\\_user\\_has\\_role\\] table.The security\\_admin role or a user with elevated privileges is required to activate the plugin, or contact Customer Service and Support.\n\n</td></tr><tr><td>\n\nContextual Security: Role Management V2 REST API\\[com.glide.role\\_management.inh\\_count.rest\\_api\\]\n\n</td><td>\n\nEnables API functionality for role management.\n\n</td></tr></tbody>\n</table>Before upgrading from Contextual Security: Role Management to Contextual Security: Role Management V2, test the results of an upgrade by running the script. The script returns a list of changes that an upgrade will perform. If the changes are acceptable, install the Contextual Security: Role Management V2 plugin. If the changes are not acceptable, do not install the Contextual Security: Role Management V2 plugin. Alternatively, you can perform the upgrade and then manually make any necessary changes.\n\n## Procedure\n\n1.  Test the impact of an upgrade prior to upgrading by running the following script.\n\n    1.  Navigate to **System Definition** &gt; **Scripts - Background**.\n\n    2.  Run the following script in global scope.\n\n        ```\n        new RoleManagementVerify().verifyInheritedRoles();\n        ```\n\n        For large sys\\_user\\_has\\_role tables, the execution may take up to several hours to complete. Do not edit or add user roles during this time.\n\n        Example result based on test data:\n\n        ```\n        *** Script: 2016-12-01 19:58:54 Starting checking of inherited roles for all users... \n        *** Script: User: itam, inherited roles to be ADDED: financial_mgmt_user \n        *** Script: User: bernard.laboy, inherited roles to be DELETED: api_analytics_read,pa_viewer,rest_api_explorer,a123 \n        *** Script: User: bernard.laboy, inherited roles to be ADDED: dependency_views \n        *** Script: Number of inherited-role records in sys_user_has role, current: 260, after re-calculation: 258 \n        *** Script: Number of users with discrepancies for inherited roles: 2 \n        *** Script: 2016-12-01 19:58:55 Finished checking of inherited roles for all users!\n        ```\n\n    3.  Evaluate the script results to determine whether the proposed changes are acceptable.\n\n2.  Activate the Contextual Security: Role Management V2 plugin.\n\n    **Important:** The security\\_admin role or a user with elevated privileges is required to activate the plugin, or contact Customer Service and Support.\n\n    1.  Navigate to **System Definition** &gt; **Plugins**.\n\n    2.  Find and click the plugin name.\n\n    3.  On the System Plugin form, review the plugin details and then click the **Activate/Upgrade** related link.\n\n    4.  Click **Activate**.\n\n\n## Result\n\nAfter activating Role Management V2, the changes outlined in the script result are enacted. The Inheritance Count \\(inh\\_count\\) column in the User Roles table is read-only and automatically reflects the number of times the user inherits a role.\n\n"}}