ThreatLocker Policies
policiesCreate, update, list, and deploy application control rules that permit, deny, or ringfence software on computer groups.
Instructions
Manage ThreatLocker policies.
Use list_all to search policies by computer group / org / filter without an applicationId; use list_by_application when you already have an applicationId.
Policies define what applications can run on which computer groups. A policy links an application (set of file rules) to a computer group with an action (permit/deny/ringfence).
Common workflows:
Get policy details by ID: action=get, policyId="..."
List all policies for an application: action=list_by_application, applicationId="...", organizationId="..."
Find policies for a specific group: action=list_by_application, applicationId="...", organizationId="...", appliesToId="group-id"
Include deny policies in results: action=list_by_application, ..., includeDenies=true
Create new policy: action=create, name="...", applicationIds=["..."], computerGroupId="...", osType=1, policyActionId=1
Update policy (full replace - get first!): action=update, policyId="...", name="...", applicationIds=["..."], computerGroupId="...", osType=1, policyActionId=1
Delete policies: action=delete, policyIds=["..."], organizationId="..."
Copy policies between groups: action=copy, osType=1, policyIds=["..."], sourceAppliesToId="...", sourceOrganizationId="...", targetAppliesToIds=["..."]
Deploy pending changes: action=deploy, organizationId="..."
IMPORTANT: After create/update/delete/copy, deploy changes with action=deploy to push to computers. IMPORTANT: Update is a full replace — use action=get first to read current values, then provide ALL fields.
Policy actions: Permit (allow), Deny (block), Ringfence (allow but restrict network/storage access)
Pitfalls:
Precedence is first-match-wins (Global > Global Group > Entire Org > Computer > Computer Group). New policies land at the bottom unless orderBefore=true.
monitorMode=1 (Secured) creates an explicit deny that overrides Learning Mode; monitorMode=2 is Monitor Only.
allowRequest/killRunningProcesses are only valid with policyActionId=2 (Deny).
Ringfence requires policyActionId=6 + ringfencingOptions (5 restrict flags + rf* arrays). rfFilePolicy permission: permit 1=read-only/2=read+write, deny 1=deny-write/2=deny-read+write. rfNetworkPolicy.server uses "tag:".
policySchedules requires policyScheduleStatus=2; networkExclusions pairs with restrictNetworkAccess=true.
update is FULL-REPLACE: get first, then resend ALL nested arrays (ringfencingOptions/policySchedules/networkExclusions/userGroups/parentProcessIdList/requestEmailAddressesList) you want to keep — omitting one removes it. Payload-verified, NOT live-tested.
Scoping: userGroups needs allUserGroups=false; deviceType needs allDevices=false; parentProcessIdList needs parentRestrictionEnabled=true (apps must match the policy osType); applicationSelection=1 (all apps) needs a name containing "Permit All" or starting "Default - "; notifyOnRequest/requestEmailAddressesList are Deny-only (policyActionId=2).
Permissions: View Application Control Policies, Edit Application Control Policies. Pagination: list_by_application is paginated (use fetchAllPages=true to auto-fetch all pages). Key response fields: policyId, name, policyActionId, applicationId, computerGroupId, isEnabled.
Related tools: applications (what the policy permits), computer_groups (where policy applies), action_log (see policy enforcement)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Policy name (required for create, update) | |
| action | Yes | get=single policy by ID, list_all=search/list policies for a group or org (no applicationId needed), list_by_application=all policies for an application, create=create new policy, update=update existing policy (full replace - use get first to read current values), delete=delete policies, copy=copy policies between groups, deploy=deploy pending policy changes | |
| filter | No | list_all filter: ""=all, nomatch, match, over6weeks, ringfence, noringfence, elevation, permitonly | |
| osType | No | OS type: 1=Windows, 2=macOS, 3=Linux, 5=Windows XP (required for create, update, copy) | |
| endDate | No | Expiration date in UTC (YYYY-MM-DDTHH:MM:SSZ). Used with policyScheduleStatus=1. | |
| pageSize | No | Results per page (default: 25, max: 500) | |
| policyId | No | Policy GUID (required for get, update) | |
| isEnabled | No | Enable policy (default: true for create) | |
| logAction | No | Log to Unified Audit (default: true for create) | |
| policyIds | No | Policy GUIDs (required for delete, copy) | |
| activeOnly | No | list_all: only return active policies | |
| allDevices | No | true=policy applies to all device types; false=restrict to deviceType. | |
| deviceType | No | Single device interface to scope to (requires allDevices=false). Only one per policy. | |
| pageNumber | No | Page number (default: 1) | |
| searchText | No | Free-text filter for list_all | |
| userGroups | No | User/AD-group scoping (requires allUserGroups=false). Re-send all on update or they are removed. | |
| appliesToId | No | Computer group GUID to filter by. Find via computer_groups first. | |
| description | No | Policy description / notes. | |
| monitorMode | No | 0=Inherit, 1=Secured (explicit deny that overrides Learning Mode), 2=Monitor Only. | |
| orderBefore | No | Place the new policy at the top of its scope instead of the bottom (policy precedence is first-match-wins). | |
| allowRequest | No | Allow users to request access when denied. Only valid with policyActionId=2 (Deny). | |
| allUserGroups | No | true=policy applies to all users; false=restrict to userGroups. Full-replace on update. | |
| applicationId | No | Application GUID (required for list_by_application). Find via applications search first. | |
| fetchAllPages | No | Fetch all pages automatically (max 10 pages). Default: false (single page). | |
| includeDenies | No | Include deny policies (default: false) | |
| applicationIds | No | Application GUIDs (required for create, update). Mapped to applicationIdList. | |
| organizationId | No | Organization GUID (required for list_by_application, deploy). Find via organizations first. | |
| policyActionId | No | 1=Permit, 2=Deny, 6=Permit+Ringfence (required for create, update) | |
| computerGroupId | No | Computer group GUID (required for create, update) | |
| elevationStatus | No | 0=None, 1=Elevate+Notify, 2=Silent, 3=Force Standard User | |
| notifyOnRequest | No | Email admins on approval requests. Only valid with policyActionId=2 (Deny); requires requestEmailAddressesList. | |
| policySchedules | No | Recurring schedule windows (requires policyScheduleStatus=2). | |
| response_format | No | Output format: markdown (default, human-readable) or json (structured) | markdown |
| showAllPolicies | No | list_all: include inherited higher-level policies | |
| elevationEndDate | No | Expiry for an elevation policy in UTC, distinct from endDate. | |
| networkExclusions | No | Internet-ringfence exclusions (pairs with ringfencingOptions.restrictNetworkAccess=true). | |
| sourceAppliesToId | No | Source computer group GUID (required for copy) | |
| ringfencingOptions | No | Ringfencing config (requires policyActionId=6). 5 restrict flags are required; rf* arrays are optional. | |
| targetAppliesToIds | No | Target computer group GUIDs (required for copy) | |
| parentProcessIdList | No | Application GUIDs allowed to launch this policy's apps (requires parentRestrictionEnabled=true; all must match the policy osType). Full-replace on update. | |
| applicationSelection | No | 0=use applicationIds (default), 1=all applications. Value 1 requires the policy name to contain "Permit All" or start with "Default - ". | |
| killRunningProcesses | No | Kill running processes when policy denies. Only valid with policyActionId=2 (Deny). | |
| policyScheduleStatus | No | 0=None, 1=Expiration, 2=Schedule | |
| sourceOrganizationId | No | Source organization GUID (required for copy) | |
| parentRestrictionEnabled | No | Enable parent-process restriction (requires parentProcessIdList). | |
| requestEmailAddressesList | No | Admin emails notified on requests (with notifyOnRequest=true; Deny-only). Full-replace on update. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Response data — shape varies by action | |
| error | No | ||
| success | Yes | ||
| pagination | No |