Close
Thank you for your feedback.

User Role Inheritance API - GET /global/user_role_inheritance

User Role Inheritance API - GET /global/user_role_inheritance

This method retreives the roles the user has an determine what was inherited.

URL format

Versioned URL: api/global/v1/user_role_inheritance

Default URL: api/global/user_role_inheritance

Supported parameters

Table 1. Supported parameters
ParameterDescription
user_sysidThe Sys ID of the user.

Status codes

Table 2. Status codes
Status codeDescription
200Indicates the query ran successfully.

Sample request

The response body shows you this information about the user's role:

  • user_name: the username for the Sys ID you queried.
  • from_role: the roles that are either granted directly or inherited from other roles.
  • from_group: the roles that are inherited from groups that have roles.

The following is an example using modified demo data:
{
  "result": {
    "user_name": "abel.tuter",
    "from_group": [
      "[Azure Operators]/sn_azure.operator",
      "[Azure Operators]/sn_azure.operator/sn_azure.user"
    ],
    "from_role": [
      "/snc_internal",
      "/cloud_user",
      "/cloud_user/pa_viewer",
      "/cloud_user/sn_azure.user",
      "/cloud_user/aws_user"
    ]
  }
}

Products > ServiceNow Platform > Web services; Versions > Istanbul