Hello Ivan Rieznyk ,
Thank you for your message and for outlining your environment so clearly. You're correct—Azure AD accounts often do not populate the LastUseTime property in Win32_UserProfile, which makes identifying inactive profiles more challenging.
As a workaround, we recommend using the Get-LocalUser and Get-ItemProperty cmdlets to check profile folders under C:\Users and correlate them with the LastWriteTime of the NTUSER.DAT file. This file is updated during user logon and can serve as a proxy for last activity.
You can also deploy a PowerShell script via Intune that checks NTUSER.DAT timestamps and flags profiles older than 30 days for cleanup. Be sure to exclude system and default profiles to avoid unintended deletions.
If this guidance helps resolve your issue, feel free to click “Accept Answer” so others can benefit too.
Thank you so much!!!
Best regards,
QQ.