Recently, I worked on an interesting issue where a user suddenly lost access to company resources. It looked like a simple compliance issue at first, but the real cause was something else: the device had been deleted from Microsoft Intune.

But how do you find out who deleted a device in Intune?

In this post, I’ll walk you through my troubleshooting process, show you how to investigate device deletions using Intune audit logs and Azure Log Analytics, and share the KQL queries I used to identify what happened.

The Problem

A user reported two issues, one right after the other. First, the device showed this message:

“Your organization has removed your workplace account.”

Who deleted a device in Intune

Windows notification: workplace account removed

Shortly after, Conditional Access blocked the user with:

“Device must comply with your organization’s compliance requirements.”

Normally, I would start by checking whether the device is non-compliant or whether the registration is broken. But when I looked at Intune, the device record gave no clear answer. So I had a few open questions:

  • Was the device retired or wiped?
  • Was the Intune device object deleted?
  • Was the Entra ID device deleted?
  • Who did it, and when?
  • This is the second message the user saw when trying to sign in:
Who deleted a device in Intune

Conditional Access block: device must comply with compliance requirements

How to Investigate a Deleted Device in Microsoft Intune

Why This Is Hard to Investigate ? When a device is deleted from Intune, the audit log entry does not use the device name. It uses IDs, such as the managed device object ID, the device ID, or the Entra ID device ID.

Support engineers normally search by device name. Once the device object is gone from Intune, that search returns nothing, and you can’t easily connect the name to the ID in the audit log.

The link we need looks like this: Device name → Device ID → Audit event

If the device data is no longer available, that first link is missing.

What Saved Us

In this case, Intune diagnostic data was already being sent to a Log Analytics workspace. That means the old device records were still there, even though the device was gone from the Intune console.

If you don’t have this set up yet, I’d strongly suggest you do it. It is very hard to investigate a deleted device without it.

How to Find Device Deletions in Intune Audit Logs – Troubleshooting Steps

Step 1: Check the current device record in Intune

The first thing was to search for the device in the Intune admin center. It did not explain anything, and the device could not be found as expected So we moved to the historical data in Log Analytics.

Step 2: Find the device in Log Analytics and get the Device ID

I searched the IntuneDevices table using the device name (the serial number also works):

IntuneDevices
| summarize arg_max(TimeGenerated, *) by DeviceName
| where DeviceName contains "DEVICE-SERIAL"

The result gave me the details I needed:

  • Device name: DEVICE-NAME
  • Device ID: <managed-device-id>
  • User: user@contoso.com

Device record found in the IntuneDevices table (details hidden)

The important value here is the Intune managed Device ID. Everything else depends on it.

If you only have the serial number, use this query instead:

IntuneDevices
| where SerialNumber == "DEVICE-SERIAL"
| project TimeGenerated, DeviceName, DeviceId, UPN, ManagedBy
| order by TimeGenerated desc

Step 3: Search the Intune audit logs using the Device ID

Now that I had the Device ID, I searched the audit logs for that exact device:

IntuneAuditLogs
| where TimeGenerated > ago(7d)
| where tostring(Properties) contains "<managed-device-id>"
| project TimeGenerated, OperationName, Identity, Properties
| order by TimeGenerated asc

Two activities came back:

  • Create ClientCertificate
  • Delete ManagedDevice

The second one, Delete ManagedDevice, is the one we cared about.

Step 4: Check who deleted the device

Opening the Delete ManagedDevice record showed:

  • Operation: Delete ManagedDevice
  • Status: Success
  • Initiated by: adminaccount@contoso.com
  • Application: Microsoft Intune portal extension

So now we knew four things for sure:

  1. The device did not just have a random compliance error.
  2. The Intune device object was deleted on purpose.
  3. The delete action was successful.
  4. It was done by an admin from the Intune portal, and we had the exact time and account.

Step 5: Confirm it in the Intune admin center

I wanted to make sure the Log Analytics data matched what Intune shows. To do that:

  1. Open the Intune admin center
  2. Go to Tenant administration
  3. Select Audit logs
  4. Filter by time, user, and the Delete ManagedDevice operation

The details matched what I found in Log Analytics. Here is the audit log entry from the portal, which is the evidence:

Intune audit log: Delete ManagedDevice, status Success, 05 Oct 2026 10:04:17 GMT (IDs and account hidden)

Root Cause

Here is what the evidence showed:

  • The device was enrolled and managed by Intune.
  • On 05 October 2026 at 10:04:17 GMT, a Delete ManagedDevice operation ran successfully.
  • It was started from the Intune portal by an administrator account.
  • The deleted object had the Device ID I found in Step 2.

This also explains the messages the user saw. According to Microsoft, when you use the Delete action on a Windows device in Intune, it sends a Retire command to the device. Retire removes the management and the work account from the device. Once that happened, the device was no longer managed or compliant, so Conditional Access blocked the user.

So the issue was not a compliance problem or a broken registration. The device had been deleted from Intune.

Microsoft reference: Device action: Delete in Microsoft Intune

Resolution

Now that we knew who did it and when, the next step was a business one: ask the admin why the device was deleted and check for a matching ticket or change request.

To get the user working again, the device needs to be enrolled in Intune again so it can get its policies and become compliant.

KQL Queries to Find Who Deleted a Device in Intune

Here are the queries from this investigation in one place.

//Who deleted a device in Intune usefull Queries list

//Find a device by name
IntuneDevices
| summarize arg_max(TimeGenerated, *) by DeviceName
| where DeviceName contains "DEVICE-SERIAL"


//Find a device by serial number
IntuneDevices
| where SerialNumber == "DEVICE-SERIAL"
| project TimeGenerated, DeviceName, DeviceId, UPN, ManagedBy
| order by TimeGenerated desc


//Find audit records for one device
IntuneAuditLogs
| where tostring(Properties) contains "<managed-device-id>"
| project TimeGenerated, OperationName, Identity, Properties
| order by TimeGenerated asc


//Check recent delete, retire and wipe actions
IntuneAuditLogs
| where TimeGenerated > ago(7d)
| where OperationName has_any ("Delete ManagedDevice", "Retire", "Wipe")
| project TimeGenerated, OperationName, Identity
| order by TimeGenerated desc


//Optional: make the audit output easier to read
//This query pulls a few fields out of the JSON in the Properties column. The fields you see depend on the schema in your workspace, so you may need to adjust it.
IntuneAuditLogs
| where TimeGenerated > ago(7d)
| extend Audit = parse_json(Properties)
| extend ActorUPN = tostring(Audit.Actor.UPN)
| extend ApplicationName = tostring(Audit.Actor.ApplicationName)
| extend TargetObjectId = tostring(Audit.TargetObjectIds[0])
| project TimeGenerated, OperationName, Identity, ActorUPN, ApplicationName, TargetObjectId, Properties
| order by TimeGenerated desc

Lessons Learned

Without historical logs, you know something went wrong, but you can’t easily tell which deleted object matches the device, what its Device ID was, who deleted it, or when.

With historical device and audit data, you can follow the chain: device name or serial number, then Device ID, then audit event, then admin account, then time, then root cause.

Best Practices for Monitoring Intune Device Deletions

  • Send Intune device and audit logs to a Log Analytics workspace.
  • Set a retention period long enough for investigations and audit needs.
  • Limit the Delete, Retire and Wipe permissions to approved roles only.
  • Ask for a ticket or change reference before anyone deletes, retires or wipes a device.
  • Keep device naming and serial number records consistent, so devices are easy to match later.
  • Test once in a while that your team can trace a device name back to its Device ID and audit event.
  • Set up alerts for delete, retire and wipe operations.

Final Thoughts

Audit logs don’t just tell you that something happened. They tell you what happened, when, which object it affected, and who did it. With Intune logs in Log Analytics, this case went from guessing to a clear answer in a few queries.

Comments (1)

Tokyo

11.30.2026 AT 07:51 PM
Someone is in trouble...