/portalAPI/UserRoles/*

2 min. readlast update: 07.16.2026

This article will encompass all portalAPI calls that are related to /portalAPI/UserRoles/* endpoints

 

If you are new to working with ThreatLocker PortalAPI endpoints and/or have questions regarding authentication and terminology used throughout this article, please look through the following guide:

Getting Started with ThreatLocker PortalAPIs

 

UserRolesGetByParameters

https://portalapi.INSTANCE.threatlocker.com/portalapi/UserRoles/UserRolesGetByParameters

  • Method: POST
  • Description: This API is used when navigating to the Users page in the ThreatLocker Portal and clicking on the Roles tab in the top right corner to display the Roles available for use in the organization. Roles are available per individual organization, no inheritance of Roles from different or child organizations can be used. If looking to view user roles in a different organization than the currently logged-in/managed organization, utilize the managedOrganizationId header.
  • Required Body/Parameters
    • Fields
      • pageNumber and pageSize: This value determines how many Roles will be returned as if the response was on the Roles tab of the Users page. However, this field does not follow the same conventions of the pageNumber and pageSize values as the Portal does (pageSize in the Portal is 25, 50, 100, or 500). Any valid integer can be entered and it will return in the selected formatting. For example, no matter the total number of Roles to be returned, if pageNumber” : 1 and “pageSize” : 2, 2 entries will be returned per page and the first two Roles will be shown.
        • Expects: An Integer value
    • Required body
{
"pageNumber": <Integer>,
"pageSize": <Integer>
}
  • Optional Body/Parameters
    • Fields
      • searchText: This field allows you to search through the list of your Roles by inputting any text/details you want to search for. This field will narrow the search based on the name of the Role.
        • Expects: Any text input
    • Optional body
{
  "pageNumber": <Integer>,
  "pageSize": <Integer>,
  "searchText": "<String>"
}
  • Permissions Needed for User
    • Role Administrator
Was this article helpful?