{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":40274,"path":"platform-security/access-control/Role-Mgmt-V2.md","title":null,"bundle":null,"doc_type":null,"release":null,"body":"---\ntitle: Prevent duplicate entries with Contextual Security: Role Management V2\ndescription: Roles inherited from other roles are added as individual entries in the User Roles table \\[sys\\_user\\_has\\_role\\], potentially causing one role to have duplicate entries. Contextual Security: Role Management V2 eliminates these duplicate entries and prevents future duplicates.\nlocale: en-US\ncanonical_url: https://www.servicenow.com/docs/r/australia/platform-security/access-control/Role-Mgmt-V2.html\nrelease: australia\nproduct: Access Control\nclassification: access-control\ntopic_type: concept\nlast_updated: \"2026-03-12\"\nreading_time_minutes: 1\nbreadcrumb: [Contextual Security Manager, Access Control Lists \\(ACLs\\), Access Management]\n---\n\n# Prevent duplicate entries with Contextual Security: Role Management V2\n\nRoles inherited from other roles are added as individual entries in the User Roles table \\[sys\\_user\\_has\\_role\\], potentially causing one role to have duplicate entries. Contextual Security: Role Management V2 eliminates these duplicate entries and prevents future duplicates.\n\n## Eliminate duplicate entries through inheritance count\n\nContextual Security: Role Management V2 uses the Inheritance Count \\(inh\\_count\\) column to track the number of times a role is inherited from another role or group. In the User Roles \\[sys\\_user\\_has\\_role\\] table, a user can inherit a specific role only one time, eliminating duplicate entries. The Inheritance Count \\(inh\\_count\\) column is read-only and calculates the number of times the user inherits a role.\n\n## Activation changes\n\nContextual Security: Role Management V2 is automatically installed on new instances and can be activated for upgrades. When activated, Contextual Security: Role Management V2 replaces both Contextual Security and Contextual Security: Role Management Enhancements.\n\nWhen Contextual Security: Role Management V2 is activated, the following columns are deprecated, but remain in the User Roles table for backward compatibility:\n\n-   granted\\_by \\(used only by Role Delegation\\)\n-   included\\_in\\_role\n-   included\\_in\\_role\\_instance\n\n**Warning:** If these columns are in use in any custom scripts on your instance, do not upgrade to Role Management V2.\n\n## Visualize role inheritance through the Role Inheritance Map\n\nThe Role Inheritance Map displays a visual representation of inherited roles. You can use this map to understand the roles represented in the Inheritance Count \\(inh\\_count\\) column. To view the Role Inheritance Map, configure the User Roles \\[sys\\_user\\_has\\_role\\] table to display the Role Inheritance Map column.\n\n\\[Omitted image \"RoleInheritanceMap.png\"\\] Alt text: Role inheritance map\n\n**Note:** Concurrent update to group or role assignment may result in incorrect inheritance count. You must enable the `glide.security.inh_count_patcher.enabled` property to get the exact inheritance count.\n\n"}}