在Google工作区中没有MFA的用户

发布于 2025-02-09 02:27:34 字数 112 浏览 2 评论 0原文

我想知道我们是否可以从没有多个因素身份验证的Google Workspace中的用户中删除任何数据,还可以从Google Workspace中的Admin API中拉出任何内容,例如用户列表或没有MFA的用户?

I want to know if we can pull out any data from the users in google workspace who don't have multi factor authentication, also can we pull anything from admin API in Google Workspace like the list of users or anything for the users without MFA?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青丝拂面 2025-02-16 02:27:34

是的,这是可能的。您可以使用Directory API使用users.list方法来完成此操作,并通过简单查询从isenrolledin2sv参数中检查值,您可以列出所有没有的用户在他们的帐户中设置MFA。

例如,您可以使用Directory API和建议的方法使用以下脚本:

function usersNotEnrolled() {
  let request = {
      "customer": "my_customer",
      "query": "isEnrolledIn2Sv=false"
    };
  let userList = AdminDirectory.Users.list(request);
  for(let i=0; i<userList.users.length; i++)
  {
    Logger.log(userList.users[i].primaryEmail);
  }
}

参考:

Yes it is possible. You can use the Directory API to do this with the users.list method and with a simple query checking the value from the isEnrolledIn2Sv parameter you can list all the users that have not set up MFA in their accounts.

As an example you can use the following script from Google Apps Script using the Directory API and the suggested methods:

function usersNotEnrolled() {
  let request = {
      "customer": "my_customer",
      "query": "isEnrolledIn2Sv=false"
    };
  let userList = AdminDirectory.Users.list(request);
  for(let i=0; i<userList.users.length; i++)
  {
    Logger.log(userList.users[i].primaryEmail);
  }
}

References:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文