简体   繁体   English

是否可以使用Google Apps脚本以编程方式锁定用户帐户(G Suite)

[英]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 名称简要说明

  1. GmailApp : Provides access to Gmail threads, messages, and labels. GmailApp:提供对Gmail线程,邮件和标签的访问。

  2. GmailAttachment : An attachment from Gmail. GmailAttachment:来自Gmail的附件。

  3. GmailDraft : A user-created draft message in a user's Gmail account. GmailDraft:用户的Gmail帐户中由用户创建的草稿邮件。

  4. GmailLabel : A user-created label in a user's Gmail account. GmailLabel:用户的Gmail帐户中用户创建的标签。

  5. GmailMessage : A message in a user's Gmail account. GmailMessage:用户的Gmail帐户中的邮件。

  6. 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.

相关问题 是否可以将 Google Apps Script Web App 发布到 G Suite Marketplace? - Is it possible to publish a Google Apps Script Web App to G Suite Marketplace? 有G Suite / Google Apps API吗? - Is there a G Suite/Google Apps API? 使用第二因素身份验证在G Suite帐户上执行Google Apps脚本 - Executing Google Apps Scripts on G Suite accounts with 2nd Factor Authentication 是否可以更改文件夹的权限并使用Apps Script(G-Suite)以编程方式移动它? - Can I change permission of a folder and move it programmatically using Apps Script (G-Suite)? 使用 Google Apps 脚本从 G Suite 管理控制台中删除 web 应用程序 - Remove the web apps from the G Suite Admin Console by using Google Apps Script 如何获取使用 Google Apps 脚本的 G Suite 用户列表? - How to get a list of G Suite users which are using Google Apps Script? 是否可以使用Apps脚本创建Google协作平台页面以及子页面? - Is it possible to create Google Sites page along with subpages using Apps Scripts? 从G Suite管理员SDK删除用户帐户的脚本 - Script to delete a user account from G Suite Admin SDK 使用 Google Apps 脚本发送的 G Suite 电子邮件未发送“邮件已阻止” - G Suite Emails Sent with Google Apps Script Are Not Delivered "Message Blocked" 事件保存/更新时的 g-suite Google 日历应用程序脚本 - g-suite Google Calender Apps script On Event Save/Update
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM