检索用户帐户的方法'上次使用配置 API 登录的日期
目前我的域下有 90,000 个用户帐户,我一直在手动删除不活动的帐户,但这似乎没有成效,而且浪费时间。我想利用配置 API 来删除这些帐户,但我似乎找不到一种方法来检索用户帐户的上次登录日期(以识别哪些是非活动帐户)。是否有任何方法可以让我检索所有用户帐户的上次登录日期?谢谢。
凯斯
There are currently 90,000 user accounts under my domain, and I have been manually deleting inactive accounts but it seems unproductive and a waste of time. I want to make use of provisioning API to delete these accounts, but I can't seem to find a way to retrieve the user accounts' last signed in date (to identify which are the inactive ones). Are there any methods which allows me to retrieve the last signed in dates of all user accounts? Thank you.
Ks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除了配置 API,您还可以使用报告 API,特别是用户帐户报告,其中包括上次登录日期的列。您还可以生成活动报告,显示多个时间段内活动和空闲的帐户数量。您可以使用客户端库从 PHP 代码中使用报告 API
instead of the Provisioning API you can use the Reporting API, specifically the User accounts report, which includes a column for last login date. You can also generate the activity report that shows the number of accounts active and idle for several periods of time. You can use the Reporting API from PHP code using the client library
要删除不活跃的帐户,您需要结合使用报告 API配置API。使用报告 API,提取“帐户”报告。有一个列last_login_date,您可以用它来识别非活动用户——您可以使用Provisioning API 批量删除这些用户。
To delete inactive accounts, you'll use the Reporting API in tandem with the Provisioning API. With the Reporting API, pull an 'accounts' report. There is a column last_login_date, which you can use to identify inactive users -- these users you can batch delete using the Provisioning API.