I have a scheduled task that moves, strips group memberships from and disables users when their last login timestamp is more than 5 weeks ago.
I don't want users that are actively using their account in Azure to be caught by this task. I want to add an exception for those user accounts that have recent authentications in Azure.
The current scheduled task catches users that do not have a recent domain last login timestamp. In those cases those users have generally been authenticated by Entra and are actively present in Azure / M365 logs as being active.
Am I over thinking this?
I have a task which mainly does what I need. An unwanted impact is inconveniencing users that are able to connect into our infrastructure and do their work without logging into AD. Until they unexpectedly get switched off.