Skip to main content
Connector guides

Connect Microsoft Defender for Endpoint

Microsoft Defender for Endpoint connects an AI assistant to Defender: alerts, incidents, devices, advanced hunting and response actions, in your own directory or in a customer's.

Written By Christopher Scaminaci

Last updated About 3 hours ago

Microsoft Defender for Endpoint connects an AI assistant to Defender: alerts, incidents, devices, advanced hunting and response actions, in your own directory or in a customer's.

With it your AI can:

  • Read alerts, incidents, devices, vulnerabilities, software and advanced hunting results
  • Respond (Pro plans) - isolate a device, run a scan, collect an investigation package, restrict code execution

Set it up

  1. Open Connectors, then Set up Microsoft.
  2. Tick Microsoft Defender for Endpoint and any other Microsoft connector you want. One app serves all of them.
  3. Pick StackJack's app, or one app of your own. The wizard creates it for you, or fixes one you bring.
  4. Sign in on each connector, then consent your customers in one run.
  5. Read the checklist. Open the wizard again at any time and it checks again.

Steps and the reasons behind them are on Set up Microsoft. If you prefer a shell, the provisioning script does the app registration without the wizard.

Roles you need

  • Security Administrator in each customer
  • Application Administrator or Cloud Application Administrator in each customer, so StackJack can consent your app there

These are Microsoft's documented minimums.

When something goes wrong

What you seeWhat to do
A 403 when you preview Authorize all customersThat card's own app cannot read its own registration. The message names the app and gives one grant link for your own directory. Open it once, then preview again.
A customer is listed as "no Defender (skipped)"Nothing is wrong. The customer has no Defender for Endpoint or Defender for Business.
Microsoft says admin consent is needed (AADSTS65001)Open Set up Microsoft, step 3 or step 4.
Microsoft stops the consent with AADSTS650052The directory does not have a service the link asks for. The page that opens after the sign-in says Consent was not granted and shows this code, and Microsoft's message names the service by its application ID. Each link from StackJack asks only for its own connector's permissions, so the service is usually that connector's own, and the directory cannot use that connector (for example, a directory with no Defender). The Purview content search link is the one exception: it asks for every permission on the app, so the directory needs every service the app lists. If the ID is 4990cffe-04e8-4e8b-808a-1175604b879f, it is the Microsoft Partner permission (user_impersonation) on the app. With StackJack's app or your own app, make a fresh consent link in StackJack and send that link. Only the Purview content search link on your own app still needs the removal: remove Microsoft Partner from the API permissions of your app registration in Microsoft Entra, or download the current provisioning script again and run it with -AppId set to your app's application (client) ID. A re-run adds a new client secret, replaces the permission list with the tier you pass (Full if you pass none), and replaces the display name with -DisplayName, so pass the app's current name. Do not remove Microsoft Partner Center; it is a different permission. To consent your own customers without a link, use Authorize all customers on the card. If the message names another service, contact support.

See the generated Microsoft Defender for Endpoint tool reference for the current inventory, plan assignment, input schemas and destructive-action labels.

Microsoft Defender for Endpoint tools

mde_ · 110 tools · Free 83 · Pro 27

Machines

ToolWhat it does
mde_find_machines_by_ip
Free · Read-only
Finds the devices seen with an internal IP address around a time: the 15 minutes either side of the timestamp, which must be within the past 30 days.
mde_find_machines_by_tag
Free · Read-only
Finds the devices carrying a tag.
mde_get_machine
Free · Read-only
Gets one device by its machine id.
mde_list_machine_alerts
Free · Read-only
Lists the alerts related to a device.
mde_list_machine_logon_users
Free · Read-only
Lists the users who logged on to a device.
mde_list_machine_missing_kbs
Free · Read-only
Lists the security updates (KBs) a device is missing.
mde_list_machine_recommendations
Free · Read-only
Lists the security recommendations for a device.
mde_list_machine_software
Free · Read-only
Lists the software installed on a device.
mde_list_machine_vulnerabilities
Free · Read-only
Lists the vulnerabilities discovered on a device.
mde_list_machines
Free · Read-only
Lists the devices onboarded to Defender for Endpoint, with health, onboarding status, OS, risk score, exposure level, tags and last-seen time.
mde_set_machine_value
Pro · Destructive
DESTRUCTIVE.
mde_update_machine
Pro · Destructive
DESTRUCTIVE.
mde_update_machine_tag
Pro · Destructive
DESTRUCTIVE.
mde_update_tag_for_machines
Pro · Destructive
DESTRUCTIVE.

Response Actions

ToolWhat it does
mde_cancel_machine_action
Pro · Destructive
DESTRUCTIVE.
mde_collect_investigation_package
Pro · Destructive
DESTRUCTIVE.
mde_get_investigation_package_uri
Free · Read-only
Gets a short-lived download URI for a collected investigation package; the link itself grants the file.
mde_get_live_response_result
Free · Read-only
Gets a short-lived download link for the output of one command of a live response action; the link itself grants the output.
mde_get_machine_action
Free · Read-only
Gets one response action and its status (Pending, InProgress, Succeeded, Failed, TimeOut or Cancelled).
mde_isolate_machine
Pro · Destructive
DESTRUCTIVE.
mde_list_machine_actions
Free · Read-only
Lists response actions and their status, so a caller can poll what it started.
mde_offboard_machine
Pro · Destructive
DESTRUCTIVE.
mde_release_machine
Pro · Destructive
DESTRUCTIVE.
mde_remove_app_restriction
Pro · Destructive
DESTRUCTIVE.
mde_restrict_app_execution
Pro · Destructive
DESTRUCTIVE.
mde_run_antivirus_scan
Pro · Destructive
DESTRUCTIVE.
mde_run_live_response
Pro · Destructive
DESTRUCTIVE.
mde_start_investigation
Pro · Destructive
DESTRUCTIVE.
mde_stop_and_quarantine_file
Pro · Destructive
DESTRUCTIVE.

Live Response Library

ToolWhat it does
mde_delete_library_file
Pro · Destructive
DESTRUCTIVE.
mde_list_library_files
Free · Read-only
Lists the scripts and files in the tenant's live response library.
mde_upload_library_file
Pro · Destructive
DESTRUCTIVE.

Indicators

ToolWhat it does
mde_batch_delete_indicators
Pro · Destructive
DESTRUCTIVE.
mde_create_indicator
Pro · Destructive
DESTRUCTIVE.
mde_delete_indicator
Pro · Destructive
DESTRUCTIVE.
mde_import_indicators
Pro · Destructive
DESTRUCTIVE.
mde_list_indicators
Free · Read-only
Lists the tenant's custom indicators (IOCs).

Alerts

ToolWhat it does
mde_batch_update_alerts
Pro · Destructive
DESTRUCTIVE.
mde_create_alert_by_reference
Pro · Destructive
DESTRUCTIVE.
mde_get_alert
Free · Read-only
Gets one alert by id.
mde_get_alert_domains
Free · Read-only
Lists the domains related to an alert.
mde_get_alert_files
Free · Read-only
Lists the files related to an alert.
mde_get_alert_ips
Free · Read-only
Lists the IP addresses related to an alert.
mde_get_alert_machine
Free · Read-only
Gets the device an alert is on.
mde_get_alert_user
Free · Read-only
Gets the user an alert is about.
mde_list_alerts
Free · Read-only
Lists Defender for Endpoint alerts.
mde_update_alert
Pro · Destructive
DESTRUCTIVE.

Advanced Hunting

ToolWhat it does
mde_run_advanced_query
Free · Read-only
Runs a Kusto advanced hunting query over the last 30 days of Defender data and returns the rows.

Automated Investigations

ToolWhat it does
mde_get_investigation
Free · Read-only
Gets one automated investigation by id.
mde_list_investigations
Free · Read-only
Lists automated investigations.

Exposure and Scores

ToolWhat it does
mde_get_device_secure_score
Free · Read-only
Gets the tenant's Microsoft Secure Score for Devices.
mde_get_exposure_score
Free · Read-only
Gets the tenant's exposure score.
mde_list_exposure_score_by_machine_group
Free · Read-only
Lists the exposure score of each device group.

Security Recommendations

ToolWhat it does
mde_get_recommendation
Free · Read-only
Gets one security recommendation.
mde_get_recommendation_software
Free · Read-only
Gets the software a recommendation is about.
mde_list_recommendation_machines
Free · Read-only
Lists the devices a recommendation applies to.
mde_list_recommendation_vulnerabilities
Free · Read-only
Lists the vulnerabilities a recommendation addresses.
mde_list_recommendations
Free · Read-only
Lists the tenant's security recommendations.

Software

ToolWhat it does
mde_get_software
Free · Read-only
Gets one software product.
mde_list_software
Free · Read-only
Lists the tenant's software inventory.
mde_list_software_distributions
Free · Read-only
Lists how a product's versions are spread across devices.
mde_list_software_machines
Free · Read-only
Lists the devices a product is installed on.
mde_list_software_missing_kbs
Free · Read-only
Lists the security updates (KBs) a product is missing.
mde_list_software_vulnerabilities
Free · Read-only
Lists a product's vulnerabilities.

Vulnerabilities

ToolWhat it does
mde_get_vulnerability
Free · Read-only
Gets one vulnerability by CVE id.
mde_list_vulnerabilities
Free · Read-only
Lists the vulnerabilities known to Defender Vulnerability Management.
mde_list_vulnerabilities_by_machine
Free · Read-only
Lists each vulnerability with the device and product it was found on.
mde_list_vulnerability_machines
Free · Read-only
Lists the devices exposed to a vulnerability.

Remediation

ToolWhat it does
mde_get_remediation_activity
Free · Read-only
Gets one remediation activity.
mde_list_remediation_activities
Free · Read-only
Lists remediation activities.
mde_list_remediation_exposed_devices
Free · Read-only
Lists the devices exposed in one remediation activity.

Assessments and Exports

ToolWhat it does
mde_export_baseline_assessment
Free · Read-only
Exports each device's security baselines compliance as JSON.
mde_export_baseline_assessment_files
Free · Read-only
Answers download URLs for the security baselines compliance; the links themselves grant the files.
mde_export_browser_extensions
Free · Read-only
Exports each device's browser extensions as JSON.
mde_export_browser_extensions_files
Free · Read-only
Answers download URLs for the browser extensions; the links themselves grant the files.
mde_export_certificate_assessment
Free · Read-only
Exports each device's certificate inventory as JSON.
mde_export_certificate_assessment_files
Free · Read-only
Answers download URLs for the certificate inventory; the links themselves grant the files.
mde_export_information_gathering_files
Free · Read-only
Answers download URLs for the information gathering assessment; the links themselves grant the files.
mde_export_non_cpe_software_inventory
Free · Read-only
Exports each device's software with no product code as JSON.
mde_export_non_cpe_software_inventory_files
Free · Read-only
Answers download URLs for the software with no product code; the links themselves grant the files.
mde_export_secure_config_assessment
Free · Read-only
Exports each device's secure configuration assessment as JSON.
mde_export_secure_config_assessment_files
Free · Read-only
Answers download URLs for the secure configuration assessment; the links themselves grant the files.
mde_export_software_inventory
Free · Read-only
Exports each device's software inventory as JSON.
mde_export_software_inventory_files
Free · Read-only
Answers download URLs for the software inventory; the links themselves grant the files.
mde_export_software_vulnerabilities
Free · Read-only
Exports each device's software vulnerabilities as JSON.
mde_export_software_vulnerabilities_files
Free · Read-only
Answers download URLs for the software vulnerabilities; the links themselves grant the files.
mde_export_software_vulnerability_changes
Free · Read-only
Exports what changed in the software vulnerabilities since a time, as JSON.
mde_get_browser_extensions_permissions
Free · Read-only
Gets the permission details of the browser extensions in the tenant.
mde_list_baseline_configurations
Free · Read-only
Lists the configurations of the security baselines assessment profiles.
mde_list_baseline_profiles
Free · Read-only
Lists the security baselines assessment profiles.
mde_list_device_antivirus_health
Free · Read-only
Lists each device's antivirus health: mode, versions, signature age and scan results.

Entity Lookups

ToolWhat it does
mde_get_domain_stats
Free · Read-only
Gets a domain's prevalence statistics in the organization.
mde_get_file
Free · Read-only
Gets a file's profile by its SHA-1 or SHA-256 hash.
mde_get_file_stats
Free · Read-only
Gets a file's prevalence statistics in the organization.
mde_get_ip_stats
Free · Read-only
Gets an IP address's prevalence statistics in the organization.
mde_list_domain_alerts
Free · Read-only
Lists the alerts related to a domain.
mde_list_domain_machines
Free · Read-only
Lists the devices that communicated with a domain; limited to 500 devices.
mde_list_file_alerts
Free · Read-only
Lists the alerts related to a file.
mde_list_file_machines
Free · Read-only
Lists the devices that have seen a file.
mde_list_ip_alerts
Free · Read-only
Lists the alerts related to an IP address.
mde_list_user_alerts
Free · Read-only
Lists the alerts related to a user.
mde_list_user_machines
Free · Read-only
Lists the devices a user logged on to.

Authenticated Scans

ToolWhat it does
mde_create_scan_definition
Pro · Destructive
DESTRUCTIVE.
mde_delete_scan_definitions
Pro · Destructive
DESTRUCTIVE.
mde_get_scan_agent
Free · Read-only
Gets one authenticated scan agent.
mde_get_scan_history_by_definition
Free · Read-only
Gets the scan history of scan definitions.
mde_get_scan_history_by_session
Free · Read-only
Gets the scan history of scan sessions.
mde_list_scan_agents
Free · Read-only
Lists the devices acting as authenticated scan agents.
mde_list_scan_definitions
Free · Read-only
Lists the tenant's authenticated scan definitions.
mde_update_scan_definition
Pro · Destructive
DESTRUCTIVE.