You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
intune2snipe currently only creates/updates Snipe-IT assets for devices that already show up in GET /deviceManagement/managedDevices — i.e. devices that have actually enrolled in Intune. There's no visibility into hardware that's been purchased and is sitting in inventory but hasn't been unboxed/enrolled yet:
Windows devices registered in Windows Autopilot but never enrolled
iOS/iPadOS/macOS devices assigned via Apple Business Manager / Apple School Manager (DEP) but not yet enrolled
Any platform (including Android) staged via Intune's manually-uploaded corporate device identifiers (serial/IMEI allowlist)
For orgs that want full asset-lifecycle tracking in Snipe-IT — from "we bought it" through "it's deployed to a user" — this is a real gap. The goal is "ultra completeness": a Snipe-IT asset should exist for a device the moment it's known to the organization, not just once someone unboxes it.
Proposed solution
Add an optional pending-enrollment inventory pre-sync, in the same shape as the Entra user pre-sync added in #33 (disabled by default, env-var gated, runs as an independent pass that doesn't change existing behavior when off).
New env vars (proposed):
Variable
Purpose
SNIPEIT_TRACK_PENDING_ENROLLMENT
Set to true to enable the pre-enrollment inventory pass (default: false)
SNIPEIT_STATUS_PENDING_ENROLLMENT
Status label for placeholder assets (default: Pending Enrollment, auto-created like the other lifecycle statuses)
SNIPEIT_PENDING_ENROLLMENT_SOURCES
Comma list of sources to pull from: autopilot, dep, corporate (default: all three)
Data sources (Microsoft Graph, beta unless noted):
Windows Autopilot — GET /deviceManagement/windowsAutopilotDeviceIdentities (already fetched today for lifecycle reconciliation, just not used to create assets). Also carries groupTag and purchaseOrderIdentifier, currently unused.
Apple DEP/ABM — GET /deviceManagement/depOnboardingSettings (one per Apple token — Business Manager and School Manager tokens can coexist, so iterate all) → .../importedAppleDeviceIdentities. Gives serialNumber, platform, enrollmentState, isSupervised, discoverySource.
Manually-staged corporate identifiers — GET /deviceManagement/importedDeviceIdentities. Cross-platform (this is the practical Android story — Google's zero-touch portal itself isn't reachable via Graph, but IMEI/serials uploaded to Intune's corporate identifier list are).
All three expose a serial (or IMEI) plus an enrollmentState (unknown/notContacted/pendingReset/failed/blocked/enrolled) and platform — a consistent, minimal shape.
Sync behavior:
For each identifier from an enabled source where enrollmentState != "enrolled" and no existing Snipe asset matches the serial, create a minimal placeholder asset: serial, platform-derived category, status Pending Enrollment, no checkout. Because the existing sync_device flow already matches assets by serial number on every run, this requires no new dedup logic — the day the device actually enrolls in Intune, the normal sync finds the placeholder by serial and fills in the rest (model, user, custom fields, checkout) in place.
Symmetrically, if a placeholder's serial later disappears from its source (order canceled, device returned) while still un-enrolled, archive it the same way reconcile_missing_devices already does for devices leaving Intune.
Smaller, related wins to fold in if we're touching this area:
Map Autopilot groupTag → Snipe location/department (auto-provision based on deployment group) and purchaseOrderIdentifier → Snipe's built-in order_number field.
A few more managedDevice properties as optional custom fields via the existing generic mapping mechanism (isEncrypted, jailBroken, totalStorageSpaceInBytes, physicalMemoryInBytes, deviceRegistrationState) — cheap since the custom-field plumbing already exists.
Permissions: Likely reuses the DeviceManagementServiceConfig.Read.All scope already required for Autopilot (same Intune "Enrollment" permission category as importedDeviceIdentities and depOnboardingSettings) — needs verification against current Graph docs at implementation time.
Only support Windows Autopilot (data we already fetch) — cheaper, but explicitly not "ultra complete" since it ignores Apple DEP/ABM and the cross-platform corporate-identifiers path, which is the intent here.
Problem or use case
intune2snipecurrently only creates/updates Snipe-IT assets for devices that already show up inGET /deviceManagement/managedDevices— i.e. devices that have actually enrolled in Intune. There's no visibility into hardware that's been purchased and is sitting in inventory but hasn't been unboxed/enrolled yet:For orgs that want full asset-lifecycle tracking in Snipe-IT — from "we bought it" through "it's deployed to a user" — this is a real gap. The goal is "ultra completeness": a Snipe-IT asset should exist for a device the moment it's known to the organization, not just once someone unboxes it.
Proposed solution
Add an optional pending-enrollment inventory pre-sync, in the same shape as the Entra user pre-sync added in #33 (disabled by default, env-var gated, runs as an independent pass that doesn't change existing behavior when off).
New env vars (proposed):
SNIPEIT_TRACK_PENDING_ENROLLMENTtrueto enable the pre-enrollment inventory pass (default:false)SNIPEIT_STATUS_PENDING_ENROLLMENTPending Enrollment, auto-created like the other lifecycle statuses)SNIPEIT_PENDING_ENROLLMENT_SOURCESautopilot,dep,corporate(default: all three)Data sources (Microsoft Graph, beta unless noted):
GET /deviceManagement/windowsAutopilotDeviceIdentities(already fetched today for lifecycle reconciliation, just not used to create assets). Also carriesgroupTagandpurchaseOrderIdentifier, currently unused.GET /deviceManagement/depOnboardingSettings(one per Apple token — Business Manager and School Manager tokens can coexist, so iterate all) →.../importedAppleDeviceIdentities. GivesserialNumber,platform,enrollmentState,isSupervised,discoverySource.GET /deviceManagement/importedDeviceIdentities. Cross-platform (this is the practical Android story — Google's zero-touch portal itself isn't reachable via Graph, but IMEI/serials uploaded to Intune's corporate identifier list are).All three expose a serial (or IMEI) plus an
enrollmentState(unknown/notContacted/pendingReset/failed/blocked/enrolled) andplatform— a consistent, minimal shape.Sync behavior:
For each identifier from an enabled source where
enrollmentState != "enrolled"and no existing Snipe asset matches the serial, create a minimal placeholder asset: serial, platform-derived category, statusPending Enrollment, no checkout. Because the existingsync_deviceflow already matches assets by serial number on every run, this requires no new dedup logic — the day the device actually enrolls in Intune, the normal sync finds the placeholder by serial and fills in the rest (model, user, custom fields, checkout) in place.Symmetrically, if a placeholder's serial later disappears from its source (order canceled, device returned) while still un-enrolled, archive it the same way
reconcile_missing_devicesalready does for devices leaving Intune.Smaller, related wins to fold in if we're touching this area:
groupTag→ Snipe location/department (auto-provision based on deployment group) andpurchaseOrderIdentifier→ Snipe's built-inorder_numberfield.managedDeviceproperties as optional custom fields via the existing generic mapping mechanism (isEncrypted,jailBroken,totalStorageSpaceInBytes,physicalMemoryInBytes,deviceRegistrationState) — cheap since the custom-field plumbing already exists.Permissions: Likely reuses the
DeviceManagementServiceConfig.Read.Allscope already required for Autopilot (same Intune "Enrollment" permission category asimportedDeviceIdentitiesanddepOnboardingSettings) — needs verification against current Graph docs at implementation time.Alternatives considered
Primary area
Microsoft Graph / Intune