Looking at the User Resource reference, there is no property to track the time when a user account was suspended (only related properties are creationTime
and deleteTime
).
So there is no built-in way to track (historically) when a user was suspended. But you can build a custom solution to store dates/timestamps when a user is suspended.
You'll need to leverage Admin Directory API Push Notifications to track when a user account is updated. This allows you to track changes to the suspended
property on a user resource; once you figure that out all you need to do is store a timestamp when it changes from false
to true
.
The following stackoverflow thread should help to get you up to speed on how to set up push notifications for the Admin Directory API. The rest is up to you:
Is it possible to watch Directory API changes from Google App Maker/Google Apps Script?