Before you start
You need:- A Microsoft Defender for Endpoint tenant in the commercial cloud.
- A Microsoft Entra administrator who can create an app registration and grant tenant admin consent.
- One or more Defender-onboarded pilot devices that are safe for testing.
- The Microsoft tenant ID, application client ID, and client secret.
Optional remote execution
Forge’s inventory reads work without Live Response. Remote endpoint actions, helper-backed inventory, and AI-session backfill need these Defender settings. In the Microsoft Defender portal, open Settings → Endpoints → Advanced features, turn on each setting below, and select Save preferences:- Live Response
- Live Response for Servers, if any pilot device is a server
- Trusted signed runner: deploy the Forge runner’s matching publisher
certificate to
LocalMachine\TrustedPublisheron each pilot device. Keep Live Response unsigned script execution off. Signing alone is not enough: the endpoint must trust the exact publisher certificate paired with that Forge release. - Unsigned script execution: enable Live Response unsigned script execution in the same Defender settings page. This permits unsigned library scripts for users with Live Response Advanced permissions on devices in scope; review those roles and device groups before enabling it.
Why the Windows trust package exists
Defender’s API executes a script from its Live Response library. Forge uploads both a fixed PowerShell runner and the native helper that runner invokes. A signature on the helper executable alone does not authorize the PowerShell runner. The runner checks the helper’s SHA-256 before executing its typed plan. The pinnedTrustedPublisher package is Forge’s deployment choice for its
runner certificate, not a Microsoft requirement to install a persistent Forge
agent first. If that exact publisher is already trusted on the endpoint, no
additional trust installation is needed. Otherwise an administrator must deploy
the matching trust package, or explicitly allow unsigned Live Response scripts.
Uploading a signed file does not itself enroll its publisher as trusted.
A publicly trusted certificate chain and an approved PowerShell publisher are
different checks: Microsoft’s PowerShell signing guidance
describes the prompt for a signed script whose publisher has not been trusted.
The Live Response documentation does not promise that a public CA signature
alone suppresses every endpoint trust-policy requirement. Validate the signed
runner on a pilot while retaining your tenant’s signed-script policy.
Linux and macOS execution
Microsoft supports Linux Live Response starting with Defender agent version101.45.13. Its Live Response prerequisites
state that script signature verification applies only to PowerShell scripts.
Do not deploy the Windows certificate package to Linux or macOS.
Forge uploads one fixed shell runner containing both release-pinned Linux
helpers. The runner selects x86_64 or arm64 from the endpoint’s uname -m,
verifies that helper’s SHA-256, executes only the compiled typed operation
plan, and removes its private temporary directory. It does not infer CPU ISA
from Defender’s ambiguous 64-bit machine property or depend on a putfile
working-directory path. No persistent helper predeployment is required.
Linux requires sh, uname, sha256sum, base64, mktemp, and an executable
/tmp filesystem. The complete encoded runner is checked against Microsoft’s
20 MB library upload limit before submission. Forge does not offer arbitrary
shell input or disable host execution restrictions.
Microsoft’s Linux analyzer example
also uses a library script to invoke a native binary; a binary cannot replace
that API script step. Complete a read-only pilot execution before enabling
scheduled helper-backed collection on a Linux fleet.
Deploy the Windows trust package
Request the Windows runner trust package for your deployed Forge release from Forge before using the trusted signed runner option. The package includespublisher.cer, trust-runner.ps1,
detect-trust.ps1, and remove-trust.ps1. Deploy it through Intune as a Windows
app running as SYSTEM, using these commands:
The package adds only its pinned publisher certificate, not a root CA, and does
not change the device’s PowerShell execution policy. Deploy the matching trust
package before disabling unsigned scripts or changing the runner release.
Microsoft describes the settings in
Live Response prerequisites.
Each device must apply these settings itself, and the change may not take
effect until the device restarts. After changing them, restart each pilot
device before running the pilot workflow. If script trust is not ready, Defender
can report the Forge script as completed without running it. Forge detects the
missing result and reports that the runner did not execute.
Create a dedicated, single-tenant Entra app registration for Forge. Do not
reuse a broad automation app shared with other products. Microsoft documents
the app-only setup flow in
Create an app to access Microsoft Defender for Endpoint without a user.
Create credentials
- In the Microsoft Entra admin center, open Entra ID → App registrations and select New registration.
- Give the app a recognizable name, such as
Forge Endpoint Integration, select Accounts in this organizational directory only, and register it. - Open API permissions → Add a permission → APIs my organization uses.
- Search for
WindowsDefenderATP. Microsoft notes that this resource may not appear until its name is typed into the search box. - Select Application permissions and add the permissions in the table below. Do not choose delegated permissions.
- If hunting-backed features are approved, add the separate Microsoft Graph application permission shown below.
- Select Grant admin consent for <tenant> and verify that every added permission shows as granted. Application permissions require admin consent.
- Open Certificates & secrets → New client secret. Set an expiry that fits your credential-rotation policy and copy the secret value immediately; Microsoft does not show it again.
- From the app’s Overview, copy the Directory (tenant) ID and Application (client) ID.
Minimum effective permissions
Add only the application permissions required for the Forge features you plan to enable.
Do not add
Machine.Read.All when Machine.ReadWrite.All is granted. The
latter already permits machine reads and is required by Microsoft’s app-only
Live Response result API.
The permission resource and token audience use Microsoft’s legacy Defender
identifier. Forge requests the Defender token with
https://api.securitycenter.microsoft.com/.default, even though it sends API
requests to https://api.security.microsoft.com. Microsoft warns that using a
different audience can return 403 Forbidden; its current
app-only access guide
shows the required scope. Forge obtains this token automatically. Customers
only provide the tenant ID, client ID, and client secret. Microsoft Graph
hunting uses a separate Graph token.
These permissions do not grant Forge Defender policy administration. The
initial integration does not isolate or offboard devices, run antivirus scans,
quarantine files, change Defender policy, mutate Defender tags, or manage
alerts and incidents.
Credential reach and pilot safety
For a production-tenant pilot:- Choose disposable or otherwise low-risk devices that are already onboarded to Defender.
- Add a distinct Defender machine tag, such as
Forge-Pilot, to those devices. - Record each device’s Defender machine ID, hostname, operating system, and a time when it will be online.
- Enter the same tag as Pilot device tag in Forge. Forge shows matching devices for selection, then binds each selected endpoint by its exact Defender machine ID rather than by hostname.
- Keep the pilot set small and do not select ordinary employee devices for mutation testing.
- Remove the app registration or revoke its admin consent if the integration is abandoned. Rotate the client secret on your normal schedule.
Connect Forge
- In Forge, open Settings → Integrations → Microsoft Defender for Endpoint.
- Enter a connection name, Microsoft tenant ID, Application client ID, Application client secret, and Pilot device tag.
- Save the connection and run Test connection.
- Review each capability result separately. The connection test combines non-mutating provider reads with inspection of the app’s granted roles. A successful token request does not prove that an endpoint can complete a Live Response action; the guarded pilot workflow provides that proof.
- Discover the pilot devices, compare hostname and platform with your pilot record, and bind only the intended exact machine IDs.
Capabilities and coverage limits
The available endpoint actions depend on the device’s operating system. Helper-backed actions also require Live Response and the script trust setup described above.
Windows profile scans require an exact directory-user target. If the source has
no verified home, Forge first collects a bounded profile catalog through Live
Response. It compares the SID and local path reported by
Win32_UserProfile
with the Windows ProfileList registry entry and rejects redirected directories.
Only one matching source-native SID resolved to the requested directory user can
authorize the next inventory wave. Missing identity, multiple matching SIDs,
partial discovery, or a changed device/source binding produce partial coverage;
Forge never constructs a profile path from an email or logged-on-user label.
The verified path is retained for that inventory run, not as a general device
home override. A configured target user still needs authoritative SID resolution;
discovering a directory named after that user is not sufficient.
An empty browser-extension snapshot does not prove that a particular device
has no extensions. Historical hunting observations also do not represent a
current process snapshot.
Process termination is never a PID-only action. Forge first binds the request
to a process observation and requires the PID, observed start time, and
executable digest to still match before termination. A reused PID fails safely.
file.push is not a supported operation. Forge does not yet have an approved
product path that resolves authorized object bytes into this connector, and it
will not substitute a caller-supplied local path, script, or command. The
deployment and managed-configuration workflows are currently available only
for macOS devices.
Validate the connection
- Run Test connection and inspect each permission result.
- Confirm the exact machine ID, platform, architecture, and fresh Defender last-seen time.
- Run a read-only host/software inventory first; these API reads do not prove remote execution.
- On an approved online pilot, run a bounded directory or process inventory. Require a typed Forge result, not merely Defender reporting the script completed.
- Confirm the operation reaches a terminal state and its temporary library files are removed.
Temporary data and cleanup
Helper-backed operations use attempt-scoped, content-addressed library names. Forge removes its helper and runner files from the Live Response library after success, confirmed cancellation, and other terminal paths. The macOS live suite also checks that its disposable process fixture and endpoint file are gone. File packages, signed download links, transcripts, stdout, stderr, and file bytes remain transient; durable results retain typed inventory or operation state plus safe action references, byte counts, and hashes. For aGetFile or script result, Forge consumes the signed result link
immediately. If the first download returns 401, 403, or 404, Forge requests one
fresh link and retries once. It does not loop or refresh unrelated failures.
Microsoft service limits
Forge separates these provider budgets so a busy inventory route does not consume Live Response capacity. Microsoft can also return429 Too Many Requests; Forge honors the provider’s retry delay.
See Microsoft’s documentation for
machine limits,
logged-on users,
installed software,
browser-extension export,
Live Response,
result retrieval,
library upload,
library deletion,
action cancellation, and
Microsoft Graph hunting.
Troubleshooting
- The WindowsDefenderATP API is missing: type its full name under APIs my organization uses; Microsoft says it may not appear in the initial list.
- Authentication works but a capability fails: verify that the exact application permission was added and that admin consent shows as granted.
- Defender requests return
403despite granted roles: verify the access token audience ishttps://api.securitycenter.microsoft.com. Forge uses that legacy audience for requests sent tohttps://api.security.microsoft.com, as required by Microsoft’s current app-only guidance. - A pilot device is absent: confirm it is onboarded, recently seen by Defender, and has the exact tag entered in Forge.
- Live Response is rejected: confirm the device and operating system meet Microsoft’s Live Response prerequisites. Microsoft also requires a minimum remediation level for some Defender device-group configurations.
- Forge reports that Defender did not run the Forge script: verify either that the Windows endpoint trusts the exact publisher certificate paired with the Forge runner release, or that Live Response unsigned script execution is on under Settings → Endpoints → Advanced features and has applied to the device. After changing Defender settings, restart the device and rerun the action. A tamper-protected Defender service cannot be restarted on its own; restart the device instead.
- A Live Response request is already active: Microsoft permits only one active session per machine. Wait for the existing action to finish or cancel it through the owning workflow.
- Requests are throttled: wait for Forge’s displayed retry time. Do not add permissions or create a second app registration to work around a quota.