Microsoft Intune (v2)
Manage Intune devices, endpoint security policies and scratch groups
Reads Intune devices and Entra device records, runs device actions, and manages endpoint security policies and SOC Scratch groups over Microsoft Graph.
microsoft-intune-v2_2.1.3.tgz
Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.
Reads Microsoft Intune managed devices and Entra device records, runs Intune device actions (sync, scan, reboot, retire, wipe, passcode, lost mode, remote lock and account operations), and manages endpoint security policies, SOC Scratch groups and group membership, all through Microsoft Graph with application permissions. Writes to policies and groups are limited to objects whose names start with "SOC Scratch"; anything else is refused before a Graph call. A read-only execute_api_request operation covers other GET paths under /deviceManagement.
Live-tested on FortiSOAR 8.0.1 against a Microsoft 365 lab tenant.
Authentication: a Microsoft Entra app registration with client credentials (tenant ID, client ID and client secret). The app registration needs these Microsoft Graph application permissions: DeviceManagementManagedDevices.Read.All, DeviceManagementManagedDevices.ReadWrite.All, DeviceManagementManagedDevices.PrivilegedOperations.All, DeviceManagementConfiguration.ReadWrite.All, Group.ReadWrite.All and Directory.Read.All (for the Entra device lookup). Admin consent is required.
Prerequisites: an Intune licence on the tenant, and at least one device that Intune manages. Windows 10/11, iOS, Android and macOS devices enrol in Intune directly. Windows Server cannot enrol; it receives endpoint security policies only through Defender for Endpoint security settings management. That needs the device onboarded to Defender and patched (Windows Server 2022 needs KB5025230 or later), "Use MDE to enforce security configuration settings from Intune" on with the platform ticked and the Configuration Manager switch off in the Defender portal, the Intune connection on, and "Allow Microsoft Defender for Endpoint to enforce Endpoint Security Configurations" on in Intune. Intune remote actions (wipe, restart, sync) are not available on a Defender-managed server. The connector README lists each step.
Live coverage on 2.1.3: 16 operations and 5 playbook branches run live, including the device-present branches against a Windows Server managed by Defender for Endpoint. Intune remote actions (sync, reboot, wipe and the others) need an MDM-enrolled device, so they stay offline-tested only (sanitised mocks and a loopback Graph).
2.1.2 and 2.1.3 fixes: the Block IP firewall rule now sets its action to Block (before, Windows created it as Allow, seen on a device), and adding a device that is already a group member succeeds instead of failing a second run.
Not live-tested (offline only), with the reason:
Operations (reason for all: no enrolled device on the lab tenant; device-level operations need an enrolled device, and the lab's only Windows host is Windows Server, which Intune does not enrol):
- shutdown_device
- reboot_device
- retire_device (destructive)
- wipe_device (destructive)
- clean_windows_device (destructive)
- recover_passcode_of_device
- reset_passcode_of_device
- remote_lock_of_device (destructive)
- request_remote_assistance_of_device
- disable_lost_mode_of_device
- locate_device
- bypass_activation_lock_of_device (destructive)
- logout_shared_apple_device_active_user
- delete_user_from_shared_apple_device (destructive)
- sync_device
- windows_defender_scan
- windows_defender_update_signature
- update_windows_device_account (destructive)
- get_managed_device_details: the found path is not live; the not-found error path was live-tested.
- add_device_to_group: needs a device to add; no enrolled device on the lab tenant.
- remove_device_from_group: needs a device in the group; no enrolled device on the lab tenant.
Playbook branches (the connector's playbooks are in the companion collection):
- Intune - Inventory check, Devices Present: needs at least one device in the inventory; no enrolled device on the lab tenant.
- Intune - Device lookup and sync, Sync Requested: needs a found device to sync; no enrolled device on the lab tenant.
- Harden endpoint on incident, Policy Clean: needs an Entra device in the group and a policy status read; no enrolled device on the lab tenant.
- Harden endpoint on incident, Policy Reported Problem: needs a non-compliance row for a device; no enrolled device on the lab tenant.
- Block IP on endpoint firewall, Policy Reported Problem: needs a non-compliance row for a device; no enrolled device on the lab tenant.
Destructive operations (wipe, retire, remote lock and similar) are covered by synthetic labelled mocks only and are never run against a device by the lab suite.
Configuration · 5 fields
- Server URL
resourcetext requiredThe Microsoft Graph base URL. Must be https://graph.microsoft.com.
Default
https://graph.microsoft.com - Tenant ID
tenant_idtext requiredDirectory (tenant) ID of the app registration.
- Client ID
client_idtext requiredApplication (client) ID of the app registration.
- Client Secret
client_secretpassword requiredClient secret. Re-enter after rotation; the connector re-reads it on the next call.
- Verify SSL
verify_sslcheckboxVerify the TLS certificate of Microsoft Graph.
Default
true
Operations · 40
Get Managed Devices List
list_managed_deviceslist_managed_devicesRetrieves a list of all managed devices from Microsoft Intune.
No parameters.
ReturnsvalueGet Managed Device Details 1 param
get_managed_device_detailsget_managed_device_detailsRetrieves details for a specific managed device from Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsvalueRetire Device 1 param
retire_deviceretire_deviceRetires a specific device from Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageWipe Device 1 param
wipe_devicewipe_deviceWipes a specific device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageReset Passcode Device 1 param
reset_passcode_of_devicereset_passcode_of_deviceResets the passcode for a specific device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageRemote Lock Device 1 param
remote_lock_of_deviceremote_lock_of_deviceRemotely Locks a specific device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageRequest Remote Assistance for Device 1 param
request_remote_assistance_of_devicerequest_remote_assistance_of_deviceRequests remote assistance for a specific device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageDisable Lost Mode for Device 1 param
disable_lost_mode_of_devicedisable_lost_mode_of_deviceDisables the 'lost mode' for a specific device in Microsoft Intune based on the managed device ID that you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageLocate a Device 1 param
locate_devicelocate_deviceLocates a specific device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageBypass Activation Lock for Device 1 param
bypass_activation_lock_of_devicebypass_activation_lock_of_deviceBypasses the activation lock of a specific device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageReboot Device 1 param
reboot_devicereboot_deviceReboots a specific device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageShutdown Device 1 param
shutdown_deviceshutdown_deviceShuts down a specific device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageRecover Passcode for Device 1 param
recover_passcode_of_devicerecover_passcode_of_deviceRecovers the passcode for a specific device from Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageClean Windows Device 1 param
clean_windows_deviceclean_windows_deviceCleans, i.e., removes any apps that are installed on a device that runs on Windows in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageLogout Apple Device for Active User 1 param
logout_shared_apple_device_active_userlogout_shared_apple_device_active_userLogs out a shared Apple device for an active user in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageDelete User from Apple Device 1 param
delete_user_from_shared_apple_devicedelete_user_from_shared_apple_deviceDeletes a user from a shared Apple device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageSync Device 1 param
sync_devicesync_deviceSyncs a specific device using Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageWindows Defender Scan 1 param
windows_defender_scanwindows_defender_scanScans a device using Windows Defender in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageUpdate Signature for Windows Defender 1 param
windows_defender_update_signaturewindows_defender_update_signatureUpdates the signature for Windows Defender in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageUpdate Account for Windows Device 1 param
update_windows_device_accountupdate_windows_device_accountUpdates an account for a Windows device in Microsoft Intune based on the managed device ID you have specified.
- Managed Device ID
managedDeviceIdselect requiredPick a managed device from the list or enter its managed device ID (GUID). The list shows up to 200 devices, one page.
ReturnsmessageExecute API Request 2 params
execute_api_requestexecute_api_requestSend a read-only GET to Microsoft Graph under /deviceManagement, using the connector's app token.
- Endpoint path
endpointtext requiredPath under /v1.0, for example /deviceManagement/managedDevices. Must start with /deviceManagement/.
- Query parameters
querydictOData query string parameters, for example $top.
Returnsstatus_codebodyGet Managed Device Options
get_managed_device_optionsget_managed_device_optionsPopulates the Managed Device ID dropdowns with up to 200 devices as "name [id]" choices. Hidden from the palette.
No parameters.
ReturnstypeitemsList Endpoint Security Policies 1 param
list_endpoint_security_policieslist_endpoint_security_policiesLists Intune settings-catalog (endpoint security) policies, including the tenant defaults. Read-only.
- Maximum items
topintegerHow many items to return (1 to 200).
Default
50
ReturnsvaluecountGet Endpoint Security Policy 1 param
get_endpoint_security_policyget_endpoint_security_policyGets one endpoint-security policy with its settings and the groups it is assigned to. Read-only.
- Policy
policyIdselect requiredPick a scratch or tenant endpoint-security policy from the list, or enter its policy ID (GUID). Writes are refused unless the policy name starts with SOC Scratch.
ReturnsidnamesettingsassignedGroupIdsList Endpoint Security Templates
list_endpoint_security_templateslist_endpoint_security_templatesLists the Windows 10 endpoint-security templates (Defender Antivirus, Windows Firewall Rules, ASR and others) that a new policy can be created from. Read-only.
No parameters.
ReturnsvaluecountCreate Endpoint Security Policy 6 params
create_endpoint_security_policycreate_endpoint_security_policyCreates a settings-catalog policy from a template. The name must start with SOC Scratch. settingsJson is the JSON array of Graph settingInstance objects (see the README for the Defender AV and firewall-rule examples).
- Policy name
nametext requiredMust start with SOC Scratch.
- Description
descriptiontextOptional description.
- Template
templateIdselect requiredPick the template (from the list) or enter its template ID.
- Platforms
platformstextGraph platforms value.
Default
windows10 - Technologies
technologiestextGraph technologies value, e.g. mdm,microsoftSense.
Default
mdm,microsoftSense - Settings (JSON)
settingsJsontext requiredJSON array of settingInstance objects for the policy.
ReturnspolicyIdnameactionacceptedassignedGroupIdsDelete Endpoint Security Policy 1 param
delete_endpoint_security_policydelete_endpoint_security_policyDeletes an endpoint-security policy. Only a policy whose name starts with SOC Scratch can be deleted.
- Policy
policyIdselect requiredPick a scratch or tenant endpoint-security policy from the list, or enter its policy ID (GUID). Writes are refused unless the policy name starts with SOC Scratch.
ReturnspolicyIdnameactionacceptedAssign Endpoint Security Policy To Group 2 params
assign_endpoint_security_policyassign_endpoint_security_policyAssigns a SOC Scratch policy to a SOC Scratch Entra group. Keeps the policy's other group assignments.
- Policy
policyIdselect requiredPick a scratch or tenant endpoint-security policy from the list, or enter its policy ID (GUID). Writes are refused unless the policy name starts with SOC Scratch.
- Group
groupIdselect requiredPick a SOC Scratch Entra group, or enter its group ID (GUID). Membership and assignment writes are refused for any other group.
ReturnspolicyIdnameactionacceptedassignedGroupIdsUnassign Endpoint Security Policy From Group 2 params
unassign_endpoint_security_policyunassign_endpoint_security_policyRemoves a SOC Scratch group from a SOC Scratch policy's assignments. The other assignments are kept.
- Policy
policyIdselect requiredPick a scratch or tenant endpoint-security policy from the list, or enter its policy ID (GUID). Writes are refused unless the policy name starts with SOC Scratch.
- Group
groupIdselect requiredPick a SOC Scratch Entra group, or enter its group ID (GUID). Membership and assignment writes are refused for any other group.
ReturnspolicyIdnameactionacceptedassignedGroupIdsGet Endpoint Security Policy Status 2 params
get_endpoint_security_policy_statusget_endpoint_security_policy_statusReads per-device status for a policy from Intune: one row per device with a non-succeeded state, with the status label. An empty result with reported true means no device reports a problem. Read-only.
- Policy
policyIdselect requiredPick a scratch or tenant endpoint-security policy from the list, or enter its policy ID (GUID). Writes are refused unless the policy name starts with SOC Scratch.
- Device name
deviceNametextOptional: only report this device (exact name, case-insensitive).
ReturnspolicyIdcountrowsreportedList SOC Scratch Groups 1 param
list_scratch_groupslist_scratch_groupsLists Entra groups whose name starts with SOC Scratch. Read-only.
- Maximum items
topintegerHow many items to return (1 to 200).
Default
50
ReturnsvaluecountCreate SOC Scratch Group 1 param
create_scratch_groupcreate_scratch_groupCreates a security group. The name must start with SOC Scratch.
- Group name
displayNametext requiredMust start with SOC Scratch.
ReturnsiddisplayNameList Group Members 1 param
list_group_memberslist_group_membersLists the members (devices, users, groups) of an Entra group. Read-only.
- Group
groupIdselect requiredPick a SOC Scratch Entra group, or enter its group ID (GUID). Membership and assignment writes are refused for any other group.
ReturnsvaluecountAdd Device To SOC Scratch Group 2 params
add_device_to_groupadd_device_to_groupAdds an Entra device to a SOC Scratch group. A policy assigned to the group then reaches the device. Refused for any other group.
- Group
groupIdselect requiredPick a SOC Scratch Entra group, or enter its group ID (GUID). Membership and assignment writes are refused for any other group.
- Device
deviceIdselect requiredPick an Entra device from the list, or enter its device object ID (GUID).
ReturnsgroupIddeviceIdactionacceptedalreadyMemberRemove Device From SOC Scratch Group 2 params
remove_device_from_groupremove_device_from_groupRemoves an Entra device from a SOC Scratch group. Refused for any other group.
- Group
groupIdselect requiredPick a SOC Scratch Entra group, or enter its group ID (GUID). Membership and assignment writes are refused for any other group.
- Device
deviceIdselect requiredPick an Entra device from the list, or enter its device object ID (GUID).
ReturnsgroupIddeviceIdactionacceptedalreadyMemberFind Entra Device By Name 1 param
resolve_entra_deviceresolve_entra_deviceLooks up an Entra device by its exact display name. Returns found false (not an error) when no device has that name. Read-only.
- Device name
deviceNametext requiredExact Entra display name of the device.
ReturnsfounddeviceIddisplayNameoperatingSystemGet Endpoint Security Policy Options
get_endpoint_security_policy_optionsget_endpoint_security_policy_optionsDropdown source: policy names with IDs.
No parameters.
Get Endpoint Security Template Options
get_endpoint_security_template_optionsget_endpoint_security_template_optionsDropdown source: Windows 10 template names with IDs.
No parameters.
Get SOC Scratch Group Options
get_scratch_group_optionsget_scratch_group_optionsDropdown source: SOC Scratch group names with IDs.
No parameters.
Get Entra Device Options
get_entra_device_optionsget_entra_device_optionsDropdown source: Entra device names with object IDs (up to 200).
No parameters.