---
title: Microsoft Defender API Integration on Truto
slug: msdefender
category: Security
canonical: "https://truto.one/integrations/detail/msdefender/"
---

# Microsoft Defender API Integration on Truto



**Category:** Security  
**Status:** Beta

## MCP-ready AI tools

Truto exposes 110 tools for Microsoft Defender that AI agents can call directly.

- **list_all_microsoft_defender_alert_domains** — Retrieves all domains related to a specific alert. Needs delegated permission URL.Read.All. Required: alert_id.
- **list_all_microsoft_defender_alert_files** — Retrieves all files related to a specific alert. Needs delegated permission File.Read.All. Required: alert_id.
- **list_all_microsoft_defender_alert_ips** — Retrieves all IPs related to a specific alert. Needs delegated permission Ip.Read.All. Required: alert_id.
- **get_single_microsoft_defender_alert_machine_by_id** — Retrieves Device related to a specific alert. Needs delegated permission Machine.Read or Machine.ReadWrite. The id is the alert id. Required: id.
- **get_single_microsoft_defender_alert_user_by_id** — Retrieves the User related to a specific alert. Needs delegated permission User.Read.All. The id is the alert id. Required: id.
- **list_all_microsoft_defender_alerts** — Retrieves a collection of Alerts. Needs delegated permission Alert.ReadWrite.
- **get_single_microsoft_defender_alert_by_id** — Retrieves specific Alert by its ID. Needs delegated permission Alert.ReadWrite. Required: id.
- **update_a_microsoft_defender_alert_by_id** — Updates properties of existing Alert. Needs delegated permission Alert.ReadWrite. Required: id.
- **create_a_microsoft_defender_alert** — Creates new Alert on top of Event. Needs delegated permission Alert.ReadWrite. Required: eventTime, reportId, machineId, severity, title, description, recommendedAction, category.
- **microsoft_defender_alerts_batch_update** — Updates properties of a batch of existing Alerts. Needs delegated permission Alert.ReadWrite. Required: alertIds.
- **list_all_microsoft_defender_baseline_compliance_assessments** — Returns all security baselines assessments for all devices, on a per-device basis. It returns a table with a separate entry for every unique combination of DeviceId, ProfileId, ConfigurationId. Paged JSON response (pageSize up to 200,000). Needs delegated permission SecurityBaselinesAssessment.Read.
- **microsoft_defender_baseline_compliance_assessments_export** — Export the full Security baseline assessment methods and properties per device as downloadable files. Returns SAS URLs of gzip-compressed JSON-lines files (for large tenants); download them with any HTTP client. Needs delegated permission SecurityBaselinesAssessment.Read.
- **list_all_microsoft_defender_baseline_configurations** — This API retrieves a list of the configurations being assessed in active baseline profiles.
- **list_all_microsoft_defender_baseline_profiles** — Provides information about the security baselines assessment profiles APIs that pull "Microsoft Defender Vulnerability Management" data. There are different API calls to get different types of data.
- **list_all_microsoft_defender_browser_extension_assessments** — This API response contains all the data for installed browser extensions per device. Returns a table with an entry for every unique combination of DeviceId, BrowserName, ExtensionId. Paged JSON response (pageSize up to 200,000). Needs delegated permission Software.Read.
- **microsoft_defender_browser_extension_assessments_export** — Export the full browser extensions assessment as downloadable files. Returns SAS URLs of gzip-compressed JSON-lines files (for large tenants); download them with any HTTP client. Needs delegated permission Software.Read.
- **list_all_microsoft_defender_browser_extension_permissions** — Retrieves a list of all the permissions requested by a specific browser extension. This is a static data description and would mainly be used to enhance the data returned by the Export browser extensions assessment API. Needs delegated permission Software.Read.
- **list_all_microsoft_defender_certificate_assessments** — Returns all certificate assessments for all devices, on a per-device basis. It returns a table with a separate entry for every unique combination of DeviceId, Thumbprint and Path. Paged JSON response (pageSize up to 200,000). Needs delegated permission Vulnerability.Read.
- **microsoft_defender_certificate_assessments_export** — Export the full Certificate assessment methods and properties per device as downloadable files. Returns SAS URLs of gzip-compressed JSON-lines files (for large tenants); download them with any HTTP client. Needs delegated permission Vulnerability.Read.
- **microsoft_defender_configuration_score_get_current** — Retrieves the organizational device secure score. Needs delegated permission Score.Read.
- **list_all_microsoft_defender_device_av_health** — This API retrieves a list of Microsoft Defender Antivirus device antivirus health details. Returns a table with an entry for every unique combination of: Needs delegated permission Machine.Read or Vulnerability.Read.
- **list_all_microsoft_defender_domain_alerts** — Retrieves a collection of Alerts related to a given domain address. Needs delegated permission Alert.ReadWrite. Required: domain.
- **list_all_microsoft_defender_domain_machines** — Retrieves a collection of Machines that have communicated to or from a given domain address. Needs delegated permission Machine.ReadWrite. Required: domain.
- **list_all_microsoft_defender_domain_stats** — Retrieves the statistics on the given domain. Needs delegated permission URL.Read.All. Required: domain.
- **microsoft_defender_exposure_score_get_current** — Retrieves the organizational exposure score. Needs delegated permission Score.Read.
- **list_all_microsoft_defender_exposure_score_by_machine_groups** — Retrieves a list of exposure scores by device group. Needs delegated permission Score.Read.
- **list_all_microsoft_defender_file_alerts** — Retrieves a collection of alerts related to a given file hash. Needs delegated permission Alert.ReadWrite. Required: file_hash.
- **list_all_microsoft_defender_file_machines** — Retrieves a collection of Machines related to a given file hash. Needs delegated permission Machine.ReadWrite. Required: file_hash.
- **list_all_microsoft_defender_file_stats** — Retrieves the statistics for the given file. Needs delegated permission File.Read.All. Required: file_hash.
- **get_single_microsoft_defender_file_by_id** — Retrieves a File by identifier Sha1, or Sha256 Needs delegated permission File.Read.All. The id is the file SHA1 or SHA256 hash. Required: id.
- **list_all_microsoft_defender_indicators** — Retrieves a collection of all active Indicators. Needs delegated permission Ti.ReadWrite.
- **create_a_microsoft_defender_indicator** — Submits or Updates new Indicator entity. Needs delegated permission Ti.ReadWrite. Required: indicatorValue, indicatorType, action, title, description.
- **delete_a_microsoft_defender_indicator_by_id** — Deletes an Indicator entity by ID. Required: id.
- **microsoft_defender_indicators_import** — Submits or Updates batch of Indicator entities. Needs delegated permission Ti.ReadWrite. Required: Indicators.
- **microsoft_defender_indicators_batch_delete** — Deletes Indicator entities by ID. Required: IndicatorIds.
- **microsoft_defender_info_gathering_assessments_export** — Export the full information gathering assessment as downloadable files. Returns SAS URLs of gzip-compressed JSON-lines files (for large tenants); download them with any HTTP client. Needs delegated permission Vulnerability.Read.
- **list_all_microsoft_defender_investigations** — Retrieves a collection of Investigations. Needs delegated permission Alert.ReadWrite.
- **get_single_microsoft_defender_investigation_by_id** — Retrieves specific Investigation by its ID. ID can be the investigation ID or the investigation triggering alert ID. Needs delegated permission Alert.ReadWrite. Required: id.
- **list_all_microsoft_defender_ip_alerts** — Retrieves a collection of alerts related to a given IP address. Needs delegated permission Alert.Read or Alert.ReadWrite. Required: ip.
- **list_all_microsoft_defender_ip_stats** — Retrieves the statistics for the given IP. This statistic information is based on data from the past 30 days. Needs delegated permission Ip.Read.All. Required: ip.
- **list_all_microsoft_defender_library_files** — List live response library files. Needs delegated permission Library.Manage.
- **create_a_microsoft_defender_library_file** — Upload file to live response library. Needs delegated permission Library.Manage. Required: File.
- **delete_a_microsoft_defender_library_file_by_id** — Delete a file from live response library. Needs delegated permission Library.Manage. The id is the file name. Required: id.
- **list_all_microsoft_defender_machine_actions** — Retrieves a collection of Machine Actions. Needs delegated permission Machine.ReadWrite.
- **get_single_microsoft_defender_machine_action_by_id** — Retrieves specific Machine Action by its ID. Needs delegated permission Machine.ReadWrite. Required: id.
- **microsoft_defender_machine_actions_cancel** — Cancel an already launched machine action that isn't yet in final state (completed, canceled, failed). Needs delegated permission Machine.CollectForensics Machine.Isolate Machine.RestrictExecution Machine.Scan Machine.Offboard Machine.StopAndQuarantineMachine.LiveResponse. Required: machine_action_id.
- **microsoft_defender_machine_actions_get_package_uri** — Get a URI that allows downloading of an Investigation package. Needs delegated permission Machine.CollectForensics. Required: machine_action_id.
- **microsoft_defender_machine_actions_get_live_response_result_link** — Retrieves a specific live response command result by its index. Needs delegated permission Machine.LiveResponse. Required: machine_action_id, index.
- **list_all_microsoft_defender_machine_alerts** — Retrieves all Alerts related to a specific device. Needs delegated permission Alert.ReadWrite. Required: machine_id.
- **list_all_microsoft_defender_machine_logon_users** — Retrieves a collection of logged on users on a specific device. Needs delegated permission User.Read.All. Required: machine_id.
- **list_all_microsoft_defender_machine_missing_kbs** — Retrieves missing security updates by device ID Required: machine_id.
- **list_all_microsoft_defender_machine_recommendations** — Retrieves a collection of security recommendations related to a given device ID. Needs delegated permission SecurityRecommendation.Read. Required: machine_id.
- **list_all_microsoft_defender_machine_software** — Retrieves a collection of installed software related to a given device ID. Needs delegated permission Software.Read. Required: machine_id.
- **create_a_microsoft_defender_machine_tag** — Adds or removes a tag for a specific device. Needs delegated permission Machine.ReadWrite. Required: machine_id, Value, Action.
- **microsoft_defender_machine_tags_bulk_update** — Adds or removes a tag for the specified set of machines. Needs delegated permission Machine.ReadWrite. Required: Value, Action, MachineIds.
- **list_all_microsoft_defender_machine_vulnerabilities** — Retrieves a collection of discovered vulnerabilities related to a given device ID. Needs delegated permission Vulnerability.Read. Required: machine_id.
- **list_all_microsoft_defender_machine_vulnerability_pairs** — Retrieves a list of all the vulnerabilities affecting the organization by Machine and Software Needs delegated permission Vulnerability.Read.
- **list_all_microsoft_defender_machines** — Retrieves a collection of Machines that have communicated with Microsoft Defender for Endpoint. Needs delegated permission Machine.Read or Machine.ReadWrite.
- **get_single_microsoft_defender_machine_by_id** — Retrieves specific Machine by its device ID or computer name. Needs delegated permission Machine.ReadWrite. Required: id.
- **update_a_microsoft_defender_machine_by_id** — Updates properties of existing Machine. Needs delegated permission Machine.ReadWrite. Required: id.
- **microsoft_defender_machines_find_by_ip** — Find Machines seen with the requested internal IP in the time range of 15 minutes prior and after a given timestamp. Needs delegated permission Machine.ReadWrite. Required: ip, timestamp.
- **microsoft_defender_machines_find_by_internal_ip** — Use this API to create calls related to finding a device entry around a specific timestamp by internal IP. Required: timestamp, ip.
- **microsoft_defender_machines_find_by_tag** — Find Machines by Tag. Needs delegated permission Machine.ReadWrite. Required: tag.
- **microsoft_defender_machines_set_device_value** — Set the device value of a specific Machine. See assign device values for more information. Needs delegated permission Machine.ReadWrite. Required: machine_id, DeviceValue.
- **microsoft_defender_machines_isolate** — Isolates a device from accessing external network. Needs delegated permission Machine.Isolate. Required: machine_id, Comment.
- **microsoft_defender_machines_unisolate** — Undo isolation of a device. Needs delegated permission Machine.Isolate. Required: machine_id, Comment.
- **microsoft_defender_machines_restrict_code_execution** — Restrict execution of all applications on the device except a predefined set. Needs delegated permission Machine.RestrictExecution. Required: machine_id, Comment.
- **microsoft_defender_machines_unrestrict_code_execution** — Enable execution of any application on the device. Needs delegated permission Machine.RestrictExecution. Required: machine_id, Comment.
- **microsoft_defender_machines_run_antivirus_scan** — Initiate Microsoft Defender Antivirus scan on a device. Needs delegated permission Machine.Scan. Required: machine_id, Comment, ScanType.
- **microsoft_defender_machines_collect_investigation_package** — Collect investigation package from a device. Needs delegated permission Machine.CollectForensics. Required: machine_id, Comment.
- **microsoft_defender_machines_offboard** — Offboard device from Defender for Endpoint. Needs delegated permission Machine.Offboard. Required: machine_id, Comment.
- **microsoft_defender_machines_stop_and_quarantine_file** — Stop execution of a file on a device and delete it. Needs delegated permission Machine.StopAndQuarantine. Required: machine_id, Comment, Sha1.
- **microsoft_defender_machines_run_live_response** — Runs a sequence of live response commands on a device Needs delegated permission Machine.LiveResponse. Required: machine_id.
- **microsoft_defender_machines_start_investigation** — Start automated investigation on a device. Needs delegated permission Alert.ReadWrite. Required: machine_id, Comment.
- **list_all_non_cpe_software_inventory_assessments** — This API response contains all the data of installed software that doesn't have a Common Platform Enumeration(CPE) per device. Returns a table with an entry for every unique combination of DeviceId, SoftwareVendor, SoftwareName, SoftwareVersion. Paged JSON response (pageSize up to 200,000). Needs delegated permission Software.Read.
- **microsoft_defender_non_cpe_software_inventory_assessments_export** — Export the full non product code software inventory assessment per device as downloadable files. Returns SAS URLs of gzip-compressed JSON-lines files (for large tenants); download them with any HTTP client. Needs delegated permission Software.Read.
- **list_all_microsoft_defender_recommendation_machines** — Retrieves a list of devices associated with the security recommendation. Needs delegated permission SecurityRecommendation.Read. Required: recommendation_id.
- **list_all_microsoft_defender_recommendation_software** — Retrieves a security recommendation related to a specific software. Needs delegated permission SecurityRecommendation.Read. Required: recommendation_id.
- **list_all_microsoft_defender_recommendation_vulnerabilities** — Retrieves a list of vulnerabilities associated with the security recommendation. Needs delegated permission Vulnerability.Read. Required: recommendation_id.
- **list_all_microsoft_defender_recommendations** — Returns information about all security recommendations affecting the organization. Needs delegated permission SecurityRecommendation.Read.
- **get_single_microsoft_defender_recommendation_by_id** — Retrieves a security recommendation by its ID. Needs delegated permission SecurityRecommendation.Read. Required: id.
- **list_all_microsoft_defender_remediation_task_machines** — Returns information about exposed devices for the specified remediation task. Needs delegated permission RemediationTask.Read. Required: remediation_task_id.
- **list_all_microsoft_defender_remediation_tasks** — Returns information about all remediation activities. Needs delegated permission RemediationTask.Read.
- **get_single_microsoft_defender_remediation_task_by_id** — Returns information for the specified remediation activity. Presents the same columns as Get all remediation activity", but returns results only for the one specified remediation activity. Needs delegated permission RemediationTask.Read. Required: id.
- **list_all_microsoft_defender_scan_agents** — Retrieves a list of all scan agents. Needs delegated permission Machine.Read.All.
- **get_single_microsoft_defender_scan_agent_by_id** — Retrieves the details for a specified agent by its ID. Needs delegated permission Machine.Read.All. Required: id.
- **list_all_microsoft_defender_scan_definitions** — Retrieves a list of all scan definitions. Needs delegated permission Machine.Read.All.
- **create_a_microsoft_defender_scan_definition** — API to add, update, or delete an authenticated scan. Needs delegated permission Machine.ReadWrite. Required: scanType, scanName, isActive, target, intervalInHours, targetType, scannerAgent.
- **update_a_microsoft_defender_scan_definition_by_id** — API to add, update, or delete an authenticated scan. Needs delegated permission Machine.ReadWrite. Required: id.
- **microsoft_defender_scan_definitions_batch_delete** — API to add, update, or delete an authenticated scan. Needs delegated permission Machine.ReadWrite. Required: ScanDefinitionIds.
- **microsoft_defender_scan_history_list_by_definition** — Retrieves a list of the scan history by definitions. Needs delegated permission Machine.Read.All. Required: ScanDefinitionIds.
- **microsoft_defender_scan_history_list_by_session** — Retrieves a list of the scan history by session. Needs delegated permission Machine.Read.All. Required: SessionIds.
- **list_all_microsoft_defender_secure_config_assessments** — This API response contains the Secure Configuration Assessment on your exposed devices, and returns an entry for every unique combination of DeviceId, ConfigurationId. Paged JSON response (pageSize up to 200,000). Needs delegated permission Vulnerability.Read.
- **microsoft_defender_secure_config_assessments_export** — Export the full secure configuration assessment per device as downloadable files. Returns SAS URLs of gzip-compressed JSON-lines files (for large tenants); download them with any HTTP client. Needs delegated permission Vulnerability.Read.
- **list_all_microsoft_defender_software** — Retrieves the organization software inventory. Needs delegated permission Software.Read.
- **get_single_microsoft_defender_software_by_id** — Retrieves a list of software details by ID. Needs delegated permission Software.Read. Required: id.
- **list_all_microsoft_defender_software_distributions** — Retrieves a list of your organization's software version distribution Needs delegated permission Software.Read. Required: software_id.
- **list_all_microsoft_defender_software_inventory_assessments** — This API response contains all the data of installed software that has a Common Platform Enumeration(CPE), per device. Returns a table with an entry for every unique combination of DeviceId, SoftwareVendor, SoftwareName, SoftwareVersion. Paged JSON response (pageSize up to 200,000). Needs delegated permission Software.Read.
- **microsoft_defender_software_inventory_assessments_export** — Export the full software inventory assessment per device as downloadable files. Returns SAS URLs of gzip-compressed JSON-lines files (for large tenants); download them with any HTTP client. Needs delegated permission Software.Read.
- **list_all_microsoft_defender_software_machines** — Retrieve a list of devices that has this software installed. Needs delegated permission Software.Read. Required: software_id.
- **list_all_microsoft_defender_software_missing_kbs** — Retrieves missing security updates by software ID Needs delegated permission Software.Read. Required: software_id.
- **list_all_microsoft_defender_software_vulnerabilities** — Retrieve a list of vulnerabilities in the installed software. Needs delegated permission Vulnerability.Read. Required: software_id.
- **list_all_microsoft_defender_software_vulnerability_assessments** — This API response contains all the data of installed software per device. Returns a table with an entry for every unique combination of DeviceId, SoftwareVendor, SoftwareName, SoftwareVersion, and CVEID. Paged JSON response (pageSize up to 200,000). Needs delegated permission Vulnerability.Read.
- **microsoft_defender_software_vulnerability_assessments_export** — Export the full software vulnerabilities assessment per device as downloadable files. Returns SAS URLs of gzip-compressed JSON-lines files (for large tenants); download them with any HTTP client. Needs delegated permission Vulnerability.Read.
- **list_all_microsoft_defender_software_vulnerability_changes** — Returns a table with an entry for every unique combination of DeviceId, SoftwareVendor, SoftwareName, SoftwareVersion, CveId. The API pulls data in your organization as Json responses. Paged JSON response (pageSize up to 200,000). Needs delegated permission Vulnerability.Read. Required: sinceTime.
- **list_all_microsoft_defender_user_alerts** — Retrieves a collection of alerts related to a given user ID. Needs delegated permission Alert.Read or Alert.ReadWrite. Required: user_id.
- **list_all_microsoft_defender_user_machines** — Retrieves a collection of devices related to a given user ID. Needs delegated permission Machine.ReadWrite. Required: user_id.
- **list_all_microsoft_defender_vulnerabilities** — Retrieves a list of all vulnerabilities. Needs delegated permission Vulnerability.Read.
- **get_single_microsoft_defender_vulnerability_by_id** — Retrieves vulnerability information by its ID. Needs delegated permission Vulnerability.Read. The id is the CVE id. Required: id.
- **list_all_microsoft_defender_vulnerability_machines** — Retrieves a list of devices affected by a vulnerability. Needs delegated permission Vulnerability.Read. Required: cve_id.

## How it works

1. **Link your customer's Microsoft Defender account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Microsoft Defender.** The Proxy API is a 1-to-1 mapping of the Microsoft Defender API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Embed EDR response actions inside SOAR playbooks** — Let your users trigger Microsoft Defender containment actions—isolating machines, quarantining files, running AV scans—directly from your automation platform without ever leaving your UI. This turns Defender into an actionable response layer for any security workflow you orchestrate.
- **Power a unified asset and vulnerability inventory** — Pull complete device, software, and CVE data from Defender to feed CAASM or vulnerability management products. Your customers get a single pane of glass that includes endpoint telemetry alongside their cloud and network assets.
- **Automate vulnerability ticketing for ITSM workflows** — Convert Defender recommendations and missing KB data into enriched tickets in your ITSM or helpdesk product, then verify remediation once scans confirm patches are applied. This closes the loop between security findings and IT operations.
- **Sync third-party threat intelligence into customer Defender tenants** — Allow TIP and threat intel platforms to push IOCs—file hashes, IPs, URLs, domains—into each customer's Defender instance with Block or Alert actions. Your users get fleet-wide enforcement of your intelligence feed without manual uploads.
- **Stream Defender alerts into SIEM, chat, and ticketing systems** — Ingest Defender alerts with enriched context (affected users, machines, files, domains, IPs) so your product can route, deduplicate, and escalate incidents. SOC teams investigate inside your platform instead of pivoting across consoles.

## What you can build

- **One-click machine isolation and release** — Expose Defender's isolate, unisolate, restrict code execution, and run antivirus scan actions as buttons inside your incident response UI.
- **Bi-directional alert sync with status updates** — Pull Defender alerts in real time, enrich them with related files, IPs, domains, users, and machines, and push status or classification changes back using the alert update and batch update endpoints.
- **Vulnerability-to-ticket automation** — Poll recommendations, machine vulnerabilities, and missing KBs to auto-generate prioritized tickets with CVE, device ID, and patch metadata baked in.
- **Fleet-wide IOC blocking** — Let customers bulk-import SHA256 hashes, IPs, URLs, and domains into Defender as indicators with configurable Block or Alert actions, plus retroactive lookup of machines that already touched a hash.
- **Live forensic package collection** — Trigger investigation package collection and live response actions from inside your platform, then fetch the resulting download URIs to render forensic artifacts for analysts.
- **Executive exposure and configuration scorecards** — Surface Defender's organizational exposure score, configuration score, and per-machine-group breakdowns in dashboards for CISO-level reporting.

## FAQs

### How does authentication to Microsoft Defender work through Truto?

Truto handles the full Microsoft Entra ID (Azure AD) OAuth flow and token management for Defender for Endpoint APIs. Your end users connect their tenant once, and Truto manages token refresh, scope handling, and tenant routing so you never touch credentials.

### Which Defender products do these tools cover?

The available tools target Microsoft Defender for Endpoint and the Defender XDR alerts, investigations, vulnerability management (TVM), indicators, machine actions, and software inventory surfaces. This includes EDR response, vulnerability assessments, baseline compliance, and threat indicator management.

### Can we execute remediation actions, or is it read-only?

Full write and action support is available. You can isolate and unisolate machines, restrict code execution, run antivirus scans, stop and quarantine files, collect investigation packages, offboard devices, start investigations, run live response, and create or delete indicators and scan definitions.

### How do we handle pagination and large data pulls like full software inventory?

Truto normalizes pagination across all list endpoints and exposes dedicated export tools for heavy datasets—software inventory, vulnerability assessments, browser extensions, certificates, secure config, and baseline compliance assessments—so you can backfill tenant-wide data efficiently.

### How fresh is the alert and telemetry data?

Data freshness matches the Microsoft Defender API itself. Alerts, machines, and indicators can be polled on-demand or on a schedule through Truto, and list endpoints support filtering so you can pull only records changed since your last sync.

### Can we batch operations across many machines or indicators?

Yes. The integration supports batch alert updates, bulk machine tag updates, indicator batch import and batch delete, and scan definition batch delete—so you can apply changes across large fleets without looping through single-record calls.
