Skip to main content

Deploy file baits through Intune

With an Intune connection, the console sends the steps of a decoy to Intune as a platform script assigned to an Entra group. Intune runs it on each Windows device of the group when a user signs in. Each device adds its own name to the beacon address, so the alert says which device the file came from.

What you need:

  1. An Entra application of its own, separate from the Microsoft 365 one, with the Microsoft Graph application permissions DeviceManagementScripts.ReadWrite.All and Group.Read.All, admin consent and a client secret. That permission lets the application run code on the managed devices: do not give it any other permission, and if you have Entra Workload ID, limit it with a conditional access policy.
  2. An Entra group with the devices or the users that should receive the file.

Connect it: open the tenant target, Intune tab, and fill in Tenant ID, Application (client) ID and Client secret. Press Save and test. The test checks that the two permissions are there, warns about any other permission the application has, and checks that the tenant has Intune. You can also test that a group exists.

Deploy: when you add a decoy on that target, choose "Intune (managed Windows devices)" and write the group's name or object ID. The script appears in Intune under Devices → Scripts and remediations → Platform scripts, with the decoy's name. Do not edit it there.

Remove: Intune runs a cleanup script on the devices, which deletes the file only if it is this decoy's. After the Cleanup period of the connection (7 days by default) the script is deleted from Intune. A device that stays off during that time keeps the file; its address still alerts if someone uses it.