Skip to content

Commit 5b77fbf

Browse files
authored
Update README.md
Updated the readme to reflect the changes to the script. Additionally, included the link to Access Analyzer which provides Role comparison in the UI OOTB
1 parent 9c0e999 commit 5b77fbf

File tree

1 file changed

+18
-8
lines changed
  • Server-Side Components/Background Scripts/Compare Roles Between Two Users

1 file changed

+18
-8
lines changed
Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
# Compare Roles of Two Users
2+
23
Provide the usernames of two users and this script will print out the roles they share and the roles they don't share.
34

4-
## Usage
5-
Run script in **compare-roles-2-users.js** in Scripts - Background
5+
> ⚠️ **Note:** ServiceNow provides out-of-the-box functionality for comparing user access via the **Access Analyzer** . You can learn more here: https://www.servicenow.com/docs/bundle/zurich-platform-security/page/integrate/identity/task/comparing-access-controlss**
6+
>
7+
**Parameters:**
8+
- **includeInheritedRoles:**
9+
- `false` – only directly assigned roles
10+
- `true` – include roles inherited from other roles or groups
11+
12+
- **usernameA**
13+
- Username of a `sys_user`
14+
15+
- **usernameB**
16+
- Username of a `sys_user`
17+
18+
The script will output:
19+
- Roles exclusive to user A
20+
- Roles exclusive to user B
21+
- Shared roles
622

7-
* **Parameters:**
8-
- **include_inherited_roles:**
9-
- False - only directly assigned roles
10-
- True - roles inherited from other roles or groups
11-
- **username_a:** Unsername of a sys_user
12-
- **username_b:** Unsername of a sys_user
1323

1424
## Example Result
1525
![compare-roles](example-output.PNG)

0 commit comments

Comments
 (0)