Microsoft Defender for Endpoint integration
Microsoft Defender for Endpoint API for security operations on onboarded devices. List and read alerts, triage them (status, owner, classification, determination, comments) one by one or in batches, and raise an alert from an existing event; list devices, find them by tag or internal IP, read their logged-on users, software, vulnerabilities, recommendations and alerts, and change their tags and value; run response actions on a device (isolate or release, restrict or unrestrict app execution, antivirus scan, stop and quarantine a file, offboard, start an automated investigation) and follow or cancel them; manage custom indicators (allow, warn, alert or block a hash, IP, domain, URL or certificate); look up alerts, devices and statistics by file, domain, IP or user; and read threat and vulnerability management data (software inventory, vulnerabilities, security recommendations, remediation activities, exposure score and Microsoft Secure Score for Devices). Every write and response action acts for real in the tenant. Answers carry personal data (user accounts, owners, requesters, IP addresses). Not exposed: advanced hunting queries (arbitrary tenant rows, and moving to the Microsoft Graph security API), live response and its library, investigation package collection and download links, the export assessment and device health exports, authenticated scan definitions, alert evidence, the browser extension permission catalogue and security baseline profiles (no permission is documented for a user sign-in), and the routes the reference grants only to applications (indicator deletion, missing updates per device). Limits: usually 100 calls per minute and 1,500 per hour per route (lower on batch update, import, create alert and start investigation); lists return at most 10,000 items (8,000 for vulnerabilities) per call. Each user sees only the device groups their role allows. Authentication: OAuth 2.0 with the Microsoft identity platform (work or school accounts), through your own app registration with delegated WindowsDefenderATP permissions; the user needs a Defender role that allows each call (View Data for reads; Alerts investigation, Active remediation actions or Manage security setting for writes, as each tool says).
Say what should happen.
The workflow builds itself.
What you can do with Microsoft Defender for Endpoint
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Each badge shows the default agent permission of an endpoint (allowed: an agent calls it without asking; ask first: you are asked before an agent calls it, when the agent or chat asks permission for sensitive actions; never: no agent may call it), which every user can change endpoint by endpoint in their credential settings.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Device, 19 operations
find_machines_by_ipFind machines by ipGETAgents: ask firstFinds the devices seen with an internal IP address within 15 minutes before or after a timestamp in the last 30 days.find_machines_by_tagFind machines by tagGETAgents: ask firstFinds the devices with a tag, or with a tag starting with the given text when useStartsWithFilter is true.get_alert_machineGet alert machineGETAgents: ask firstReturns the device an alert is associated with.get_machineGet machineGETAgents: ask firstReturns one device by ID: OS, health, risk score, exposure level, value, tags and network interfaces.isolate_machineIsolate machinePOSTAgents: ask firstIsolates a real device from the network (Full or Selective; UnManagedDevice contains an unmanaged device) and returns the machine action. A device behind a full VPN tunnel loses the Defender cloud too.list_domain_machinesList domain machinesGETAgents: ask firstLists the devices that communicated with a domain, at most 500.list_file_machinesList file machinesGETAgents: ask firstLists the devices related to a file, identified by its SHA-1 hash only (not MD5 or SHA-256).list_machinesList machinesGETAgents: ask firstLists the devices that reported to Defender for Endpoint (only those the user can access), with OS, health, risk, exposure, tags and IP addresses; filter with $filter, page with $top and $skip.list_recommendation_machinesList recommendation machinesGETAgents: ask firstLists the devices a security recommendation applies to.list_remediation_activity_machinesList remediation activity machinesGETAgents: ask firstLists the exposed devices of one remediation activity.list_software_machinesList software machinesGETAgents: ask firstLists the devices with a software product installed.list_user_machinesList user machinesGETAgents: ask firstLists the devices related to a user (personal data).list_vulnerability_machinesList vulnerability machinesGETAgents: ask firstLists the devices exposed to a vulnerability.offboard_machineOffboard machinePOSTAgents: ask firstOffboards a real device from Defender for Endpoint (on Windows it only stops the sensor service and leaves the onboarding registry data) and returns the machine action.release_machine_from_isolationRelease machine from isolationPOSTAgents: ask firstReleases a real device from network isolation and returns the machine action; a second call while one is pending is refused.remove_app_restrictionRemove app restrictionPOSTAgents: ask firstRemoves the app execution restriction from a real device and returns the machine action.restrict_app_executionRestrict app executionPOSTAgents: ask firstRestricts a real device so that no application runs except a predefined set (Windows 10 1709 or later, with Microsoft Defender Antivirus) and returns the machine action.set_device_valueSet device valuePOSTAgents: ask firstSets the value of a device (Normal, Low or High) for real and returns the updated device.update_machineUpdate machinePATCHAgents: ask firstChanges a device for real: its tags and/or device value. machineTags REPLACES the tags unless it lists the current ones: read them with get_machine first and send them all with the change.
Alert, 10 operations
batch_update_alertsBatch update alertsPOSTAgents: ask firstChanges several alerts at once for real: status, owner, classification or determination, and/or adds a comment to each. Fields left out keep their value. Answers with an empty body. 10 calls per minute.create_alert_by_referenceCreate alert by referencePOSTAgents: ask firstCreates a real alert on top of an existing Defender for Endpoint event (eventTime, reportId and machineId identify it) and starts an automated investigation; merged into an open alert with the same title on that device. 15 calls per minute.get_alertGet alertGETAgents: ask firstReturns one alert by ID with its status, classification, determination, device, related user and comments (personal data).list_alertsList alertsGETAgents: ask firstLists the alerts within the retention period (only those on devices the user can access); filter with $filter, page with $top and $skip. Returns personal data (owners, users, comment authors). 100 calls per minute.list_domain_alertsList domain alertsGETAgents: ask firstLists the alerts related to a domain; an unknown domain gives an empty list.list_file_alertsList file alertsGETAgents: ask firstLists the alerts related to a file, identified by its SHA-1 hash only (not MD5 or SHA-256).list_ip_alertsList ip alertsGETAgents: ask firstLists the alerts related to an IP address.list_machine_alertsList machine alertsGETAgents: ask firstLists the alerts related to a device.list_user_alertsList user alertsGETAgents: ask firstLists the alerts related to a user (personal data).update_alertUpdate alertPATCHAgents: ask firstChanges an alert for real in the Defender portal: status, owner, classification or determination, and/or adds a comment. Fields left out keep their current value. Returns the updated alert.
Vulnerability, 5 operations
get_vulnerabilityGet vulnerabilityGETAgents: ask firstReturns one vulnerability by CVE ID.list_machine_vulnerabilitiesList machine vulnerabilitiesGETAgents: ask firstLists the vulnerabilities (CVEs) discovered on a device, with severity, CVSS score and exploit flags. 50 calls per minute.list_recommendation_vulnerabilitiesList recommendation vulnerabilitiesGETAgents: ask firstLists the vulnerabilities a security recommendation addresses.list_software_vulnerabilitiesList software vulnerabilitiesGETAgents: ask firstLists the vulnerabilities of a software product.list_vulnerabilitiesList vulnerabilitiesGETAgents: ask firstLists all vulnerabilities (CVEs), with severity, CVSS, EPSS, exploit flags and exposed devices; filter with $filter, page with $top and $skip.
Software, 4 operations
get_softwareGet softwareGETAgents: ask firstReturns one software product by ID.list_machine_softwareList machine softwareGETAgents: ask firstLists the software installed on a device, with its vulnerabilities count and exposure impact.list_recommendation_softwareList recommendation softwareGETAgents: ask firstReturns the software a security recommendation is about.list_softwareList softwareGETAgents: ask firstLists the organization's software inventory, with vulnerabilities count, exposed devices and impact; filter with $filter, page with $top and $skip.
File, 3 operations
get_fileGet fileGETAgents: ask firstReturns a file by its SHA-1 or SHA-256 hash: hashes, size, prevalence, publisher, signer and determination.list_alert_filesList alert filesGETAgents: ask firstLists the files related to an alert, with hashes, prevalence, signer and determination.stop_and_quarantine_fileStop and quarantine filePOSTAgents: ask firstStops a file running on a real device and deletes it (quarantine), identified by its SHA-1; files signed by Microsoft or trusted publishers are refused. Returns the machine action.
Indicator, 3 operations
import_indicatorsImport indicatorsPOSTAgents: ask firstCreates or updates up to 500 real custom indicators in one call and returns a result per indicator. 30 calls per minute.list_indicatorsList indicatorsGETAgents: ask firstLists the active custom indicators (file hashes, IPs, domains, URLs, certificates) and the action each triggers; filter with $filter, page with $top and $skip.submit_indicatorSubmit indicatorPOSTAgents: ask firstCreates (or updates, for the same value) a real custom indicator that allows, warns, audits, alerts on or blocks a file, IP, domain, URL or certificate across the tenant. At most 15,000 active indicators.
Investigation, 3 operations
get_investigationGet investigationGETAgents: ask firstReturns one automated investigation by its ID or by the ID of the alert that triggered it.list_investigationsList investigationsGETAgents: ask firstLists the automated investigations, with state, device and triggering alert; filter with $filter, page with $top and $skip.start_investigationStart investigationPOSTAgents: ask firstStarts a real automated investigation on a device and returns the investigation. 50 calls per hour.
Machine action, 3 operations
cancel_machine_actionCancel machine actionPOSTAgents: ask firstCancels for real a machine action that has not reached a final state (completed, cancelled or failed) and returns it.get_machine_actionGet machine actionGETAgents: ask firstReturns one machine action with its current status (Pending, InProgress, Succeeded, Failed, TimeOut or Cancelled). Not cached, so it can be polled after an action tool.list_machine_actionsList machine actionsGETAgents: ask firstLists the response actions run on devices (isolation, scans, quarantine, offboarding and others) with status and requester; filter with $filter, page with $top and $skip.
Security recommendation, 3 operations
get_recommendationGet recommendationGETAgents: ask firstReturns one security recommendation by ID.list_machine_recommendationsList machine recommendationsGETAgents: ask firstLists the security recommendations for a device, such as software updates or configuration changes.list_recommendationsList recommendationsGETAgents: ask firstLists the security recommendations affecting the organization, with exposed devices and score impact; filter with $filter, page with $top and $skip.
Device tag, 2 operations
tag_machineTag machinePOSTAgents: ask firstAdds or removes one tag on a device for real (Action Add or Remove) and returns the updated device.tag_machinesTag machinesPOSTAgents: ask firstAdds or removes one tag on up to 500 devices for real (Action Add or Remove) and returns the updated devices.
Exposure score, 2 operations
get_exposure_scoreGet exposure scoreGETAgents: ask firstReturns the organization's current exposure score.list_exposure_scores_by_device_groupList exposure scores by device groupGETAgents: ask firstReturns the exposure score of each device group.
Remediation activity, 2 operations
get_remediation_activityGet remediation activityGETAgents: ask firstReturns one remediation activity by ID (creator emails are personal data).list_remediation_activitiesList remediation activitiesGETAgents: ask firstLists the remediation activities created from security recommendations, with status, due date, target and fixed devices (creator emails are personal data).
User, 2 operations
get_alert_userGet alert userGETAgents: ask firstReturns the user related to an alert: account name, domain, SID, logon types and devices (personal data).list_machine_logon_usersList machine logon usersGETAgents: ask firstLists the users who logged on to a device: account, domain, logon types, first and last seen, admin flag (personal data).
Antivirus scan, 1 operation
run_antivirus_scanRun antivirus scanPOSTAgents: ask firstStarts a real Microsoft Defender Antivirus scan (Quick or Full) on a device and returns the machine action.
Device vulnerability, 1 operation
list_vulnerabilities_by_machineList vulnerabilities by machineGETAgents: ask firstLists every vulnerability affecting the organization per device and software, with the fixing KB when there is one; filter with $filter, page with $top and $skip.
Domain, 1 operation
list_alert_domainsList alert domainsGETAgents: ask firstLists the domains related to an alert.
Domain statistics, 1 operation
get_domain_statisticsGet domain statisticsGETAgents: ask firstReturns how many devices of the organization reached a domain and when it was first and last seen; prevalence 0 for an unknown domain.
File statistics, 1 operation
get_file_statisticsGet file statisticsGETAgents: ask firstReturns a file's prevalence in the organization and worldwide, first and last seen times and its most common names.
Ip address, 1 operation
list_alert_ipsList alert ipsGETAgents: ask firstLists the IP addresses related to an alert.
Ip statistics, 1 operation
get_ip_statisticsGet ip statisticsGETAgents: ask firstReturns how many devices of the organization connected to an IP address and when it was first and last seen; an invalid IP is refused.
Secure score, 1 operation
get_device_secure_scoreGet device secure scoreGETAgents: ask firstReturns the organization's Microsoft Secure Score for Devices.
Security update, 1 operation
list_software_missing_kbsList software missing kbsGETAgents: ask firstLists the security updates (KBs) missing for a software product, with devices missing each and CVEs addressed.
Software version, 1 operation
list_software_versionsList software versionsGETAgents: ask firstLists the installed versions of a software product, with installations and vulnerabilities per version.
Use Microsoft Defender for Endpoint from Claude Code, Cursor or Codex
Connect Microsoft Defender for Endpoint in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Microsoft Defender for Endpoint operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect Microsoft Defender for Endpoint
- Create your workspace
Sign up free. Nothing to install.
- Connect Microsoft Defender for Endpoint once
Add your Microsoft Defender for Endpoint connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
Microsoft Defender for Endpoint integration FAQ
What can you do with the Microsoft Defender for Endpoint integration?
LiveContext exposes 71 operations on Microsoft Defender for Endpoint, covering device, alert, vulnerability and software.
