This article will encompass all portalAPI calls that are related to /portalAPI/Organization/* 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
OrganizationGetAuthKeyById
https://portalapi.INSTANCE.threatlocker.com/portalapi/Organization/OrganizationGetAuthKeyById
- Method: GET
- Description: This API is used on the Devices page in the ThreatLocker Portal when viewing the Logon Scripts under the Comptuer Options hamburger dropdown in the top left of the Portal. This API will return the AuthKey of the currently managed organization, typically the parent organization or where the currently authenticated user is logged in/exists at. This AuthKey is used in association with the Logon Scripts that check whether ThreatLocker is installed onto your endpoints already. The AuthKey is used in the script itself so that if ThreatLocker is not installed, it will send the computer information into the ThreatLocker Portal under the "Not Installed" tab. If looking to view the AuthKey for a different organization than the currently logged in/managed organization, utilize the managedOrganizationId header as described below.
- Required Body/Parameters
- Valid APIKey/Authorization Token in header
- Optional Body/Parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- Permissions Needed for User
- Edit Computers
- Install Computers
OrganizationUpdateAuthKeyById
https://portalapi.INSTANCE.threatlocker.com/portalapi/Organization/OrganizationUpdateAuthKeyById
- Method: POST
- Description: This API is used on the Devices page in the ThreatLocker Portal when viewing the Logon Scripts under the Computer Options hamburger dropdown for the first time and clicking Generate Key so that an AuthKey can be generated for use in association with the organization. This API will generate the AuthKey for use and if there is already an AuthKey generated for the organization, the following message will be displayed: "The organization already has AuthKey, can't be updated." This AuthKey is static once initially created and is used in association with the Logon Scripts that check whether ThreatLocker is installed onto your endpoints already. The AuthKey is used in the script itself so that if ThreatLocker is not installed, it will send the computer information into the ThreatLocker Portal under the "Not Installed" tab. If looking to generate an AuthKey for a different organization than the currently logged in/managed organization, utilize the managedOrganizationId header as described below.
- Required Body/Parameters
- Valid APIKey/Authorization Token in header
- Optional Body/Parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- Permissions Needed for User
- Edit Computers
- Install Computers
OrganizationGetForMoveComputers
https://portalapi.INSTANCE.threatlocker.com/portalapi/Organization/OrganizationGetForMoveComputers
- Method: GET
- Description: This API is used on the Devices page in the ThreatLocker Portal when selecting an endpoint(s), clicking Move Computer, and searching for a target organization to move a computer into. This API will return a list of Organizations that can be the target to move computers to. A list of organizations the currently logged in/authenticated user has access to will be displayed.
- Required Body/Parameters
- Valid APIKey/Authorization Token in header
- Optional Body/Parameters
- searchText: Allows you to effectively search through the list of your organizations by inputting the name of the organization.
- Expects: Any text input
- searchText: Allows you to effectively search through the list of your organizations by inputting the name of the organization.
- Permissions Needed for User
- Edit Computers