I had a situation where I needed to make sure if a user does not exist anymore in the O365 system. I had to use CSOM for this solution and no matter how I tried I could not get any indication that a user has been deleted from the system.
I tried the IsActive field and Deleted field of an user object but no luck. No matter what I did even if the user was deleted and the expiration date of 30 days expired the user was still active.
My solution was that I checked to see if CSOM could retrieve a user profile data. If no data could be retrieved then this is an indication that the user profile has been deleted, hence the user has been deleted from the system. That is it. I used a field like account name since I know it must exist for all users.
There may be a “proper” solution for this but I just could not find one no matter how hard I tried(or maybe I just looked in the wrong place 🙂 ). Anyway see my previous post on how to get user profile information on how to do this workaround: