Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (2024)

Let’s learn how to set up automatic Intune Device Cleanup Rules to delete stale records. Stale records could create issues with Intune reporting, compliance reports, etc.

In this quick blog post, you will learn more details about how to set up Automatic Intune device cleanup rules. This cleanup task is similar to SCCM maintenance tasks.

Intune device clean-up rule to delete stale records helps Intune admins to choose between 30 and 270 days to remove the inactive device records from Intune automatically. I would recommend keeping these numbers as per your organization’s requirements.

Microsoft confirmed that you don’t need to worry about the device whose employees are on long leave such as medical, subatical, etc. Because even though the device is deleted from Intune portal, the backend will keep the devices until the device certificate expires.

Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (1)

However, you don’t have the same (like SCCM) control on Intune maintenance tasks. It’s not mandatory to set the cleanup rules within your Intune tenant because of the default behavior explained below.

Video Automatic Intune Device Cleanup Rules Delete Stale Devices

Let’s discuss, Intune Device Clean-up Rules in Detail | Remove Stale Record from Intune and Azure AD | Automation of maintenance tasks for Intune in this video.

Intune Maintenance Activities

There are different types of maintenance activities in Intune. The infra side of maintenance activities is not visible to customers. Automatic Intune Device Cleanup Rules is Intune Maintenance Activity to clean up stale device records from Intune device management solution.

  • Manual maintenance activities such as cleaning old/legacy apps, policies, Wi-Fi, VPN profiles, etc.
Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (2)

Automatic Intune Device Cleanup Rules Delete Stale Devices

These Device Cleanup rules are available to automatically remove devices that haven’t checked in for several days you set. Go to the Intune pane, choose Devices, and select Device cleanup rules to see a new law.

Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (3)

When setting this Intune Device Cleanup Rule to Yes, Intune deletes devices based on the custom number of days you specify.

  • Delete Devices based on last check-in DateYES.
  • Delete Devices that haven’t checked in for this many days90 Days (Checkout NOTE 1 for more details)
  • Click on the SAVE button to apply the rule (Checkout NOTE 2 for more information)
Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (4)

NOTE 1 – You can have custom days value between 90 to 270. Set your Intune device cleanup rules to delete Intune MDM enrolled devices that appear inactive, stale, or unresponsive. Intune applies cleanup rules immediately and continuously so that your device records remain current.

NOTE 2 – Once you click the Save button, all devices that have been inactive for the specified number of days will immediately be deleted from Intune. Intune will continue to delete devices as they exceed the number of set days. Reports with data about the removed devices may take up to 48 hours to refresh.

When you set Delete Devices based on the last check-in Date to No, Intune automatically deletes all devices that haven’t checked in to Intune for more than 270 days.

After you click Save, all devices that have been inactive for the specified number of days will immediately be deleted from Intune. Intune will continue to delete devices as they exceed the number of set days. Reports with data about the deleted devices may take up to 48 hours to refresh.

Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (5)

Intune Device Cleanup Rules Behavior

Set your Intune device cleanup rules to delete Intune MDM Enrolled and Co-Managed SCCM devices that appear as any of the following conditions, then Intune applies cleanup rules immediately.

  • Inactive
  • Stale
  • Unresponsive

NOTE 1 – Intune will also make sure the device is relevant by performing this cleanup task continuously so that your device records remain current.

NOTE 2 – This deletion action won’t remove or delete or clean up the device from Azure Active Directory. More details are in the Resources section.

How to Find Out Affected Devices

Intune provides an option to find out and export the affected devices with the Device Cleanup rules you just implemented above.

Once you click the Save button on Device Cleanup Rules, all devices that have been inactive for the specified number of days (90 Days in the above example) will immediately be deleted from Intune.

NOTE! To ensure that you are deleting the correct devices, I recommend clicking on the “View Affected Devices” link and confirming whether you want to remove those devices.

These are the devices that haven’t checked in for 90 Days.

Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (6)

Do we have the option to delete only Windows Devices?

We don’t have the option to delete only Windows Devices at this point in time. This clean-up rule in Intune is for all the stale records from Intune Devices node.

Intune Device Certificate Validity Dependency?

Dependencies on Reappearance of devices into Intune console. Microsoft Intune MDM Device CA certificate is valid for 1 year.

The threshold for devices to show up in the Intune portal is 180 days provided the Intune device certificate is not expired. if you have configured Delete devices that haven’t checked in for this many days as 90 days.

Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (7)

Resources

Automatic Intune Device Cleanup Rules Setup - How To Guide 1 (2024)
Top Articles
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 6110

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.