[英]is it possible to lock a user account (g suite) programmatically using google apps scripts
also is it possible to do that after a certain log-in attempts? 经过一定的登录尝试后是否还可以这样做?
I'm trying to create a script that locks the user's account after a certain number of failed login attempts. 我正在尝试创建一个脚本,该脚本在一定次数的失败登录尝试后将锁定用户的帐户。
I tried to check if any functions can be used to access the account setting, or how many times this user failed to login, but I got nothing so far. 我试图检查是否可以使用任何功能来访问帐户设置,或者该用户登录失败了多少次,但到目前为止我什么都没得到。
Gmail Service allows scripts to send email and access a user's Gmail account. Gmail服务允许脚本发送电子邮件并访问用户的Gmail帐户。 With only these Classes
只有这些课程
Name Brief description 名称简要说明
GmailApp : Provides access to Gmail threads, messages, and labels. GmailApp:提供对Gmail线程,邮件和标签的访问。
GmailAttachment : An attachment from Gmail. GmailAttachment:来自Gmail的附件。
GmailDraft : A user-created draft message in a user's Gmail account. GmailDraft:用户的Gmail帐户中由用户创建的草稿邮件。
GmailLabel : A user-created label in a user's Gmail account. GmailLabel:用户的Gmail帐户中用户创建的标签。
GmailMessage : A message in a user's Gmail account. GmailMessage:用户的Gmail帐户中的邮件。
GmailThread : A thread in a user's Gmail account. GmailThread:用户的Gmail帐户中的线程。
also as far as I know the lock service allows scripts to prevents concurrent access to sections of code(eg multiple users or processes modifying a shared resource to prevent collisions) but not locking an account . 据我所知,锁定服务允许脚本阻止并发访问代码段(例如,多个用户或修改共享资源的进程以防止冲突),但不锁定帐户。
any help would be appreciated . 任何帮助,将不胜感激 。
Thanks 谢谢
Pretty sure it's not possible. 相当确定这是不可能的。 Definitely not possible via the Gmail API.
绝对不可能通过Gmail API。 Your problem is getting the failed logins in real time, after that the reset is easy enough.
您的问题是实时获得失败的登录名,之后重置很容易。
Have a look at the Admin SDK for the functions you need: in particular the Reports API for failed logins & the Directory API for managing user accounts. 请查看Admin SDK,了解所需的功能:特别是用于失败登录的Reports API和用于管理用户帐户的Directory API 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.