Skip to content
How to Delete Azure AD Stale Device Records

How to Delete Azure AD Stale Device Records

In one of the recent blog posts, I shared step by step guide to Setup Automatic Intune Device Cleanup Rules. In this video post, you will be able to delete Azure AD stale device records (Old device records).

Introduction – Delete Azure AD Stale Devices

Microsoft announced the options to Delete Azure AD Stale Devices in session from Microsoft Ignite 2018. Microsoft helps IT Pro to keep device lifecycle issues by deleting the stale device records from Azure AD.

List of Azure AD Stale Device

Navigate to Azure AD -> Devices blade, you might be able to see a column called “Activity.” The “Activity” column entries will provide you the details of approximate last logon timestamp for a device.

Azure AD device attribute called ApproximateLastLogonTimestamp helps to delete Azure AD stale devices. I would recommend going through Microsoft documentation to have more details.

  • Connect-MsolService
  • Get-MsolDevice -all | select-object -Property Enabled, DeviceId, DisplayName, DeviceTrustType, ApproximateLastLogonTimestamp | export-csv C:\AzureAD_Stale_devicelist-summary.csv

Disable Azure AD Stale Device Records

Feel free to use your scripting skills to disable stale devices using the following command 🙂 I mean, if you want to disable all Azure AD obsolete devices, you can use scripting skills.

  • Disable-MsolDevice -DeviceId “b6ccb307-ba46-4f05-a22f-15938634ae45” -Force

Remove Azure AD Stale Device Records

Once the devices are disabled, you can remove Azure AD stale devices using the following command.

  • Remove-MsolDevice -DeviceId “b6ccb307-ba46-4f05-a22f-15938634ae45” -Force

Resources

Anoop C Nair
Written by
Anoop C Nair Microsoft Certified Trainer

Anoop C Nair is Workplace Technology solution architect with 25+ years (as of 2026) of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer (MCT). Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

HTMD Conference 2026

HTMD Conference 2026 – Don’t miss the opportunity to be part of HTMD Conference at Bengaluru @ Microsoft Prestige Ferns Galaxy on 5th December 2026. Current Status (Waiting List): Because the HTMD Conference is an exclusive, invite-only event, filling out the registration form places you on the official waiting list. HTMD Conference is an exclusive, […]

AC Anoop C Nair 1 min read
Intune

Personal Intune Mock Interview

Anoop is offering Intune mock interview service. This allows you (Intune Admin) have quick mock interview to prepare you for next Intune Interview for your next dream job. Checkout – https://htmd.in/1:1-with-Anoop! Personal Intune Mock Interview 1:1 Mock Interview – Let’s have a quick mock interview to prepare you for next Intune Interview. The real interview […]

AC Anoop C Nair 1 min read
Intune

Get Expert Advice on Boosting Intune Career and Resume Review

Get Expert Advice on Intune Career and Resume Review. AGI is around the corner, but it can’t replace personal connections! I’m offering 1-1 call. Book your slot with Anoop now – https://htmd.in/1:1-with-Anoop How to Boost Intune Career Quick Boost – Get expert advice on the go with me on our quick boost service. I will […]

AC Anoop C Nair 1 min read
Intune Training

Become Expert in Intune – Join Intune Training

🙏Humbled to see the great feedback about Intune Expert Training helped and my efforts made a real difference!! All the best Mohammed for your career and further upskilling – “very special thanks to Anoop Nair your in-depth Intune course was a game-changer for my preparation!” New Exciting Feature Addition to training program: 😍My students will […]

AC Anoop C Nair 2 min read