上次登录的Google Admin Directory API SDK用户不完全准确 [英] Google Admin Directory API SDK User Last Logged In Not Fully Accurate

查看:105
本文介绍了上次登录的Google Admin Directory API SDK用户不完全准确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用.Net API管理Google企业应用套件中的组织用户。在目录API中,您可以RetrieveUser。这将返回一个User对象,该对象的日期属性为LastLoginTime。



Google用帐号将上次登录时间分成三类,使用之前的api。
$ b


  • last_login_time - 上一次使用用户界面直接登录Google服务的时间 last_web_mail_time - 上次登录gmail.com webmail时

  • last_pop_time - 上次从服务器弹出或映射的时间。 (间接登录)


在新SDK中,我的文档中没有看到特定的我们如何填充此注释评论。我想知道,并且无法通过测试来自己找出规则:


  1. 这是如何填充的?

  2. 如果它不是包含更新此日期的所有用法( usage ,表示用户与其帐户之间的任何交互),我如何获得其他日期?
  3. / li>

我使用上次使用日期来回收闲置用户。因此,我需要准确地表示这个日期是什么。我测试过了,即使你需要登录到弹出窗口,它看起来从谷歌账户中弹出也没有在SDK的LastLoggedIn属性中表示。因此,任何从帐户中弹出并且没有登录的用户都可能被误删。



API参考资料

感谢任何帮助。 p>

解决方案

这三个(和更多)属性依然存在,只是没有附加到LastLoginTime。如果您想知道某个帐户是否真的处于闲置状态,则需要使用Google.Apis.Admin.Reports.reports_v1 API。您可以通过NuGet进行安装。



在您制作服务对象(许多堆栈回答可以告诉您如何执行此操作)后,使用情况如下:

  UserUsageReportResource resource = _service.UserUsageReport; 
UserUsageReportResource.GetRequest request = resource.Get(User@domain.ca,yyyy-mm-dd);
UsageReports report = request.Execute();

所有交互日期都需要进行搜索,包括LastLoginTime,然后取最新的。每个应用程序都有不同的日期,都与上次用户执行X操作的时间有关。



LastLoginTime似乎只是用户直接或间接的最后一次(通过设备),登录到Gmail服务。这不包括登录流行音乐等。


I use the .Net API for managing my organization's users within Google Apps. Within the directory API you can "RetrieveUser". This returns a User object that has a date property of "LastLoginTime".

Google used to separate out their Last Login Time for an account into three categories using the previous api.

  • last_login_time - the last time you directly logged into a google service using a UI
  • last_web_mail_time - the last time you logged into gmail.com webmail
  • last_pop_time - the last time you popped or imap'ed from their server. (indirect login)

In the new SDK, I don't see a specific "How we populate this" comment within their documentation. I'm wondering, and having trouble testing to figure out the rules myself:

  1. How this is populated?
  2. If it is not all encompassing usage that updates this date (usage meaning ANY interaction between the user and their account), how do I get other dates?

I use the last usage date to recycle idle users. Thus I need an accurate representation of what this date is. I've tested, and it appears popping from a google account is not represented within the SDK LastLoggedIn property, even though you need to log in to pop. Thus, any user that pops from the account and doesn't "Log In" could be deleted by accident.

API Reference

Appreciate any help.

解决方案

These three (And more) properties still exist, just not attached to the "LastLoginTime". If you want to know if an account is truly idle, you'll need to use the Google.Apis.Admin.Reports.reports_v1 API. You can install via NuGet.

After you make your service object (Many stack answers can show you how to do this), usage is below:

UserUsageReportResource resource = _service.UserUsageReport;
UserUsageReportResource.GetRequest request = resource.Get("User@domain.ca", "yyyy-mm-dd");
UsageReports report = request.Execute();

All the interaction dates will need to be searched through, including LastLoginTime, and then take the latest. Each application has different dates all pertaining to when the last time the user did X action.

LastLoginTime appears to be simply the last time a user directly, or indirectly (via device), logged into the Gmail service. This does not include logging in for pop etc.

这篇关于上次登录的Google Admin Directory API SDK用户不完全准确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆