/portalAPI/User/*

3 min. readlast update: 03.28.2025

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

 

Be sure to input the instance your organization exists on for each call. This is indicated with the "INSTANCE" text in each endpoint. Linked here is a KB to find your instance: 

Locating Your Organization's Instance | ThreatLocker Help Center

 

UserInviteByUsername

https://portalapi.INSTANCE.threatlocker.com/portalapi/User/UserInviteByUsername

  • Method: POST
  • Description: This API is used when navigating to the Users page in the ThreatLocker Portal, clicking the Invite User button in the top left corner, selecting a Role(s) that will apply to the newly invited user, and clicking the Send button which will call this API and send the invite to the username (email) entered. If creating a new invitation for a user in a different organization than the currently logged in/managed organization, utilize the managedOrganizationId header as described below. When inviting a new user to the ThreatLocker Portal, only the currently managed organization with the currently created Roles in the specific managed organization can be used when using this API.
  • Required Body/Parameters
    • Requires valid APIKey/Authorization Token in header
    • Fields
      • roles: This field specifies the roles that will be attached with the newly created user when it is created/accepted from the email invitation sent. Listed below are the fields required for each role:

 

Note: In order to get the Roles that can be specified for the organization, use the https://portalapi.INSTANCE.threatlocker.com/portalapi/UserRoles/UserRolesGetByParameters (POST) API to get the userRoleIds that can be used. Use fields pageSize and pageNumber, both expecting any valid Integer value, when calling the UserRolesGetByParameters API, to specify the Portal page from where the User will be invited. Utilize the corresponding managedOrganizationId header when getting user roles from organizations different than the logged in/managed organization.

 

        • userRoleId: This field expects the id of the role that will be applied to the newly invited user.
          • Expects a GUID in format: "00000000-0000-0000-0000-000000000000"
      • username: This field specifies the username/email address that will be sent the invite. When this call is completed, the email/user account will appear in the Portal with no account details or name; only the email will show. The additional details will be completed once the user receives the email and logs into the Portal for the first time.
        • Expects: Any valid email address
    • Required body
{
  "roles": [
    {
      "userRoleId": "00000000-0000-0000-0000-000000000000"
    },
    {
      "userRoleId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "username": "<String>"
}
  • Optional Body/Parameters
    • In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
  • Permissions Needed for User
    • Edit Administrators
    • Assign Roles
Was this article helpful?