"User Not Authorized" error when clicking Edit on Group Members for groups containing a sn_shop role

lidorz
Tera Contributor

Hi everyone,

I'm encountering a strange permission issue with the Edit... button on the Group Members (sys_user_grmember) related list, and I would appreciate some insight.

The Scenario:

  • We have a specific Scoped Application role: sn_shop_procurement_specialist.

  • For any standard group that does not contain this role, I can click the Edit button and manage group members perfectly fine.

  • However, for any group that contains this scoped role, clicking the Edit button and after i click save -  immediately throws a "User not authorized" error and blocks the operation.

what could be the problem?
Thanks in advance for your help!

4 REPLIES 4

yvijay
Tera Contributor

Hello @lidorz ,

 

We have previously similar kind of issues with one of the customer. Please follow the below process if it helps in your case.

 

 

  1. Test with a true user_admin or admin user.
    If that works, you’ve confirmed this is authorization around inherited role assignment, not a broken related list .

  2. Open the sys_user_role record for sn_shop_procurement_specialist and inspect Assignable by.
    If it is restricted, expand it appropriately or use the right assigning role.

  3. Run Security/ACL debugging while reproducing the save.
    Focus on denials against:

    • sys_user_grmember
    • sys_user_has_role
    • any custom ACLs or BRs tied to group membership / inherited roles.
  4. Check whether the group has any additional sensitive roles.
    If the group contains something privileged beyond sn_shop_procurement_specialist, that could be the actual blocker.

  5. Review custom BRs on user/group-role tables.
    This pattern is often caused by a control intended to limit who can add users into role-bearing groups.

Your issue is probably not that sn_shop_procurement_specialist is “bad”; it’s that adding a user to a group carrying that scoped role is treated as a role-assignment event, and your current operator is not authorized for that event.

 

 

Please mark the answer as helpful it it helps.

 

Thanks,

Vijay

 

 

hiii

the user that try to add member already have this role...
still doesnt work.

RemoteNow
Mega Contributor

Hi,

Based on the behavior described, I would recommend investigating the IAccessHandler authorization checks triggered when adding a user to a group containing scoped application roles.

Adding a user to a group also causes them to inherit the roles assigned to that group. Therefore, even if the target user already has the role directly assigned, the operator performing the group membership update may still fail the role-assignment authorization checks.

I would suggest the following:

  1. Check the affected group's assigned roles in sys_group_has_role.

  2. Review the complete role inheritance hierarchy through sys_user_role_contains, including nested roles.

  3. For each affected role whose application scope has Application Administration enabled, verify that its Assignable by field is populated.

  4. Ensure the user performing the membership update has the required Assignable by roles across the entire role hierarchy.

  5. If any affected scoped role has an empty Assignable by field, verify the intended configuration with the application owner or ServiceNow Support before modifying it.

There is also a relevant ServiceNow Knowledge Base article: KB1113558 – IAccessHandler troubleshooting: The user_admin role cannot edit or add group members to .... It includes a diagnostic script to identify missing assignable-by roles and inheritance issues.

If the role configuration is correct, I would next use Access Analyzer or Security/ACL Debugging to identify any failing IAccessHandler checks or ACLs. Custom Business Rules related to group membership should also be reviewed.

One clarification: Is the user performing the membership update already assigned the required assignable-by roles, or does the target user being added simply have the procurement specialist role already?

This distinction will help narrow down the authorization failure.