Microsoft 365 Best Practices Library · Devices

Intune device cleanup rules: keep the device list true

Devices leave a company quietly. A laptop is replaced, a phone is traded in, someone resigns and keeps their own phone. Unless someone removes the record, each one stays in Intune for good, and the device list slowly stops matching reality. Device cleanup rules hide records for devices that have stopped checking in. This guide explains exactly what the rules do and do not do, the number of days to choose, and the other half of the job in Microsoft Entra ID.

Prefer to have it done for you? IT Perfection provides Microsoft Intune management for companies in Irvine, Orange County and Los Angeles County.

Ali Hassani, CISSP and Certified CISO, IT PerfectionWritten by Ali Hassani, CISSP and C|CISO · 25+ years designing, securing and supporting business networks · Updated November 2026

Support lead helping a colleague at a computer
1 · ReviewWe compare the device list with the devices really in use.

Microsoft 365 Best Practices Library › Devices › Device cleanup rules

What it isScheduled Intune rules that automatically hide the records of devices that have not checked in for a set number of days, between 30 and 270.
Where it livesMicrosoft Intune admin center › Devices › Organize devices › Device cleanup rules
License neededMicrosoft Intune Plan 1, included in Microsoft 365 Business Premium, E3 and E5.
Time to set upThirty minutes to set the rules; a first clean-up of old records in Microsoft Entra ID can take a few hours.
Risk if missingMedium A device list full of dead records hides the real problems: reports are wrong, licenses are miscounted, and a lost device is harder to spot.

Why it matters

You cannot manage a list you do not trust

Every decision about devices starts from the list: how many are compliant, how many are encrypted, which have not been updated. If a third of the records belong to devices that were recycled a year ago, every one of those numbers is wrong, and a real non-compliant laptop is lost among the ghosts.

Cleanup rules keep the Intune list current without anyone remembering to do it.

What a rule does

Read this before choosing a number

The name suggests more than the feature does. Microsoft’s documentation is precise about it.

A cleanup rule doesA cleanup rule does not
Hide the device from the Intune admin center and reports.Wipe or retire the device. No action is sent to it.
Run on a schedule, automatically.Remove the device from Microsoft Entra ID.
Let the device reappear if it checks in again before its device certificate expires.Remove company data from the device.
Write an entry to the Intune audit log for each device it hides.Apply to devices managed through Jamf.
One rule per platformYou can create one rule for each platform, or one for all platforms. If both a platform rule and an “All platforms” rule exist, the one with fewer days applies.
30 to 270 daysThe number is how long a device may go without checking in before it is treated as inactive.
Preview firstThe rule page offers a preview of the devices that would be affected by the number you entered.

The important consequence: a cleanup rule is housekeeping, not offboarding. A device that leaves the company should be wiped or retired on purpose. The rule only tidies up what is left behind, and catches the ones nobody was told about.

How many days

Choosing the number

Pick a number longer than the longest normal absence. Someone on parental leave, a seasonal worker, or a spare laptop kept in a cupboard can each go many weeks without checking in. Ninety days suits most small and mid-sized companies. If you have seasonal staff or loan devices, use a longer period for that platform.

Nothing is lost if a live device is hidden by mistake. It reappears when it next checks in, provided its device certificate has not expired. After the certificate expires, the device has to be enrolled again.

Before you start

What to have ready

  • The Intune Administrator role. A custom role with the cleanup rule permissions also works.
  • A device export. Export all devices with their last check-in date, and sort by it.
  • A list of known long absences. Leave, seasonal work, spare and loan devices.
  • An offboarding step for devices. Who wipes or retires a device when it leaves, so the rule is the safety net and not the process.
  • BitLocker keys in mind. Deleting a device from Microsoft Entra ID removes its stored recovery keys. Do not delete a record for a laptop that may still need one.
  • The Cloud Device Administrator role for the Microsoft Entra ID part.

Step by step

Set up cleanup in six steps

  1. Look at what is stale today

    Microsoft Intune admin center › Devices › All devices

    Sort by last check-in. Look at everything older than 90 days and ask, device by device, whether it still exists. For any that are still in someone’s hands but should not be, wipe or retire them before doing anything else.

  2. Create the rule

    Microsoft Intune admin center › Devices › Organize devices › Device cleanup rules › Create

    Name the rule, choose the platform, or All platforms for a single rule, and enter the number of days under Remove devices that haven’t checked in for this many days.

  3. Preview the affected devices

    Select Preview affected devices and read the list. If it contains a device you know is in use, find out why it is not checking in before you save.

  4. Save, and add platform rules if needed

    Create the rule. Add a separate rule for a platform that needs a different number, remembering that where two rules overlap, the smaller number wins.

  5. Tidy Microsoft Entra ID as well

    Microsoft Entra admin center › Entra ID › Devices › All devices

    Devices hidden in Intune stay in Microsoft Entra ID. Microsoft’s advice for stale devices there is to disable first, wait for a grace period, and only then delete, because deletion cannot be undone. Do not delete Windows Autopilot devices this way; Microsoft warns that system-managed devices cannot be re-provisioned once deleted.

  6. Write the routine down

    One paragraph is enough: the number of days, who reviews the audit log entries, and the monthly check of stale devices in Microsoft Entra ID.

Recommended values

Settings at a glance

SettingRecommended startNotes
Rule scopeOne rule for all platformsAdd platform rules only where needed.
Days without check-in90Allowed range 30 to 270.
Before savingPreview affected devicesInvestigate any surprise.
Leaving devicesWipe or retire on purposeThe rule is the safety net.
Stale devices in Microsoft Entra IDDisable, wait, then deleteMonthly.
Autopilot devicesDo not delete from Microsoft Entra IDRemove the Autopilot registration properly first.
BitLocker keysKeep until the device is certainly goneDeleting the device record removes them.

Sources: Microsoft Learn, Device cleanup rules and Manage stale devices in Microsoft Entra ID, checked November 22, 2026.

Check that it works

How to confirm the result

  • The rule is listed. Device cleanup rules shows the rule with the platform and number of days you chose.
  • Old records are gone from the list. After the rule has run, All devices no longer shows devices beyond the limit.
  • The audit log has entries. Filter the Intune audit log by the activity name that begins “Device set to be hidden from admin by Device Cleanup Rule”.
  • A returning device reappears. A spare laptop switched on after a long gap shows up again after it checks in.
  • The counts make sense. The number of devices in Intune is close to the number of devices you actually own.
  • Microsoft Entra ID matches. Stale devices there are disabled or removed according to your routine.

Mistakes and rollback

Common mistakes, and how to step back

  • Treating the rule as offboarding. It hides a record. It does not wipe the device or remove company data.
  • Choosing 30 days. Normal holidays and leave make live devices disappear and reappear.
  • Forgetting Microsoft Entra ID. The device still exists there and still appears in sign-in and Conditional Access reports.
  • Deleting from Microsoft Entra ID straight away. Deletion cannot be undone, and it removes BitLocker recovery keys.
  • Deleting Autopilot devices. They cannot be re-provisioned once deleted.
  • Two overlapping rules by accident. The smaller number applies, which may not be the one you intended.
  • Never reading the audit log. A device hidden unexpectedly is a signal worth following up.

Rollback. Edit the rule to a larger number, or delete it. A hidden device comes back by itself when it next checks in, as long as its certificate is still valid. A device deleted from Microsoft Entra ID cannot be restored.

Licenses

Which plan gives you what

CapabilityPlan
Device cleanup rulesMicrosoft Intune Plan 1: included in Microsoft 365 Business Premium, E3 and E5.
Device management in Microsoft Entra IDIncluded with Microsoft Entra ID.

Have us do it

Prefer to hand this off?

IT Perfection maintains device records for companies in Irvine, Orange County and Los Angeles County: a first comparison of the device list with reality, cleanup rules with a safe number of days, a tidy of stale records in Microsoft Entra ID, and a device offboarding step your team can follow. You receive a written scope and a written quote before any work starts.

Ali Hassani, CISSP and Certified CISO, IT Perfection

Who does the work

Written by Ali Hassani, CISSP, C|CISO

Ali Hassani has 25+ years of hands-on experience in IT operations, cybersecurity, Microsoft infrastructure, network security and Azure, and works with businesses in Irvine, Orange County and Los Angeles County. Design, implementation and troubleshooting work is planned and reviewed by Ali personally.

This guide is for education and planning. It does not replace a professional audit, compliance assessment or vendor engineering review. Updated November 2026.

ISC2 CISSP badgeEC-Council Certified CISO (C|CISO) badgeCisco CCNP Routing and Switching badgeMCSE: Server Infrastructure badgeMicrosoft MCSE badgeMCSA: Security badgeCisco CCNA Cybersecurity badgeMCITP badge

FAQ

Intune device cleanup rules: common questions

What do Intune device cleanup rules do?

They automatically hide the records of devices that have not checked in with Intune for a number of days you choose, between 30 and 270. Hidden devices no longer appear in the admin center or in reports.

Does a cleanup rule wipe the device?

No. Microsoft states that cleanup rules do not trigger any action on the device, such as wipe or retire. To remove company data, wipe or retire the device deliberately.

Does a cleanup rule remove the device from Microsoft Entra ID?

No. The device record remains in Microsoft Entra ID and has to be handled separately, usually by disabling it first and deleting it after a grace period.

What happens if a hidden device is switched on again?

It reappears in Intune when it checks in, provided its device certificate has not expired. After the certificate expires, the device must be enrolled again.

How many days should I set?

Ninety days suits most small and mid-sized companies. Choose a number longer than the longest normal absence, such as extended leave or seasonal work.

Can I have different rules for different platforms?

Yes. You can create one rule per platform. If a platform rule and an All platforms rule both exist, the one with fewer days is applied.

Is there a record of what a cleanup rule hid?

Yes. The Intune audit log records each device hidden by a cleanup rule, with the rule name in the activity.

Need this done for your business?

IT Perfection plans, installs and supports this for companies in Irvine and Orange County

The guides explain the steps. If you would rather have it done, planned and documented by an experienced engineer, these are the services that cover it. Design, implementation and troubleshooting work is planned and reviewed by Ali Hassani personally.

Microsoft Intune management

Laptops and phones enrolled, configured and secured from one console.

View service

Endpoint security, EDR and MDR

Endpoint protection deployed, tuned and watched on every device.

View service

Endpoint and patch management

Windows and application updates tested and installed on schedule.

View service