Connect to your tenant

Sign in with the account you manage devices with. The tool reads Entra devices and their activity through Microsoft Graph, as you.

Delegated permissions asked at sign-in:

  • Device.Read.All list Entra devices with last sign-in
  • DeviceManagementManagedDevices.Read.All Intune primary user, last sync and Autopilot state (optional, listing works without it)

Asked only when you first disable, enable or delete: Directory.AccessAsUser.All. Graph has no narrower delegated permission for changing or deleting devices. The token can then do what your role allows, nothing more.

Roles: Cloud Device Administrator can disable, enable and delete. Writing the timestamp to an extension attribute needs Intune Administrator.

Devices

Load the devices on the Scan tab first.

Devices past their grace period

Disabled devices with an InactiveDevices timestamp in the chosen extension attribute that is older than the grace period. Each device is read again from Graph right before it is deleted; anything enabled or changed since is skipped, and so are Autopilot devices.

About InactiveDevices

InactiveDevices lists the devices in Entra ID with their last activity so you can find the stale ones and disable, enable or delete them in bulk.

What it does

  • Lists every Entra device with OS, join type, Autopilot, managed state, creation date and last activity.
  • Adds the Intune primary user and last sync date when Intune data is readable.
  • Filters on inactivity, age, OS, join type, Autopilot, managed state, primary user and enabled state.
  • Disables, enables or deletes the selection after showing exactly which devices change. Autopilot devices are skipped for disable and delete.
  • Optionally stamps disabled devices in an extension attribute, so the Past grace period tab can delete them later.
  • Exports the filtered list to Excel or CSV.

How it works

  • Devices: GET /beta/devices?$select=...,physicalIds,extensionAttributes.
  • Intune: GET /beta/deviceManagement/managedDevices?$select=azureADDeviceId,userPrincipalName,lastSyncDateTime,autopilotEnrolled,....
  • Inactivity: the newest of approximateLastSignInDateTime and Intune lastSyncDateTime. Without either it falls back to the creation date.
  • Autopilot: Intune autopilotEnrolled, or a [ZTDId] entry in physicalIds for devices Intune does not know.
  • Disable and enable: PATCH /v1.0/devices/{id} with accountEnabled and the optional timestamp.
  • Delete: DELETE /v1.0/devices/{id}. Deleted devices cannot be restored.

Permissions

Reading needs Device.Read.All, plus DeviceManagementManagedDevices.Read.All for the Intune data. For changes Microsoft documents Directory.AccessAsUser.All as the only delegated permission for updating and deleting devices (Device.ReadWrite.All exists for app-only access). It is asked the first time you confirm a change.

Recommended workflow

  1. Pick an extension attribute and a grace period on the Scan tab.
  2. Load the devices, filter, select and Disable.
  3. Later, use the Past grace period tab to delete only the devices that stayed disabled long enough.