Google Admin SDK API 错误:由于检测到一些可能的滥用行为,创建被禁止。

huangapple go评论61阅读模式
英文:

Google Admin SDK API Error: creation is disallowed as we've detected some potentially abusive behavior

问题

我想对一个创建/删除Google Workspace用户的Python脚本进行负载测试。然而,我遇到了以下错误。

>googleapiclient.errors.HttpError: <在请求https://admin.googleapis.com/admin/directory/v1/users?alt=json时返回的HttpError 412错误:“由于我们检测到一些潜在的滥用行为,因此禁止创建用户帐户的请求。请联系Google支持寻求帮助。"

我想进行的负载测试

我想确认是否可以成功创建1000个用户使用“Google_add.py”(并成功删除使用“Google_delete.py”),但由于我的许可证问题,我的Google Workspace不能超过10个用户。

然后,我尝试通过运行调用“Google_add.py”和“Google_delete.py”的Shell脚本,创建一个用户并删除它,再创建另一个用户并删除它...重复1000次。

错误

错误发生在运行“Google_add.py”时。

Agoogleapiclient.errors.HttpError: <在请求https://admin.googleapis.com/admin/directory/v1/users?alt=json时返回的HttpError 412错误:“由于我们检测到一些潜在的滥用行为,因此禁止创建用户帐户的请求。请联系Google支持寻求帮助。">

我的操作被检测为“一些潜在的滥用行为”。

问题

解决这个错误的唯一方法是升级我的许可证吗?
我认为很难准确确定为什么我的操作被检测为“一些潜在的滥用行为”,但请告诉我一些解决这个错误的想法,忽略它,避免它发生等等。

英文:

I want to perform a load test of a python script which creates/deletes users in the GoogleWorkspace. However, I faced the following Error.

>googleapiclient.errors.HttpError: <HttpError 412 when requesting https://admin.googleapis.com/admin/directory/v1/users?alt=json returned "A request for user account creation is disallowed as we've detected some potentially abusive behavior. Please contact Google support for help."

the load test I want to do

I want to confirm that 1000 users can be created successfully using "Google_add.py"(,and deleted successfully using "Google_delete.py"), but because of the problem of my license, my GoogleWorkspace cannot have over 10 users.

Then, I tried to create a user and delete it, create another user and delete it... 1000 times by running the shell script which calls "Google_add.py" and "Google_delete.py".

the Error

The Error occurred in ruining the "Google_add.py".

Agoogleapiclient.errors.HttpError: <HttpError 412 when requesting https://admin.googleapis.com/admin/directory/v1/users?alt=json returned "A request for user account creation is disallowed as we've detected some potentially abusive behavior. Please contact Google support for help.">

My operation has been detected as "some potentially abusive behavior."

question

Is the only way to resolve this error that I upgraded my license?
I think it is difficult to identify accurately why My operation has been detected as "some potentially abusive behavior", but please tell me some ideas to resolve this error, to ignore it, not to occur it and so on.

答案1

得分: 1

所有付费的 Google Workspace 订阅都有最初的用户上限为 50 个用户。商业版本的用户上限为 300,但是要增加最初的 50 个用户上限,您需要联系支持团队并预付您想要拥有的总用户数的 50%。

Google Workspace for Education、Google Workspace for Nonprofits 或企业版有更高的初始上限,并且没有您可以创建的最大用户数量限制。

根据您提到的内容,我可以看出您目前拥有的是试用订阅,因为只有试用版有最初的 10 个用户上限。
> 我的 Google Workspace 不能超过 10 个用户。

在批量创建用户时,Google Workspace 内置了保护系统,可以将某些行为标记为滥用,并锁定帐户以防止垃圾邮件,因为系统认为您想要使用所有这些帐户进行网络钓鱼或垃圾邮件。由于您的帐户有 10 个用户上限,而您尝试创建 1000 个用户,这就解释了为什么系统将此行为检测为“滥用”。

在这种情况下,您有 3 个选择:

  1. 联系 Google Workspace 支持团队,解释您的情况,以便他们可以在内部提交请求,看看是否可以提供例外并解锁帐户。请注意,由于您想要创建的用户数量,他们可能会建议您更改为付费的企业订阅。

  2. 在正常工作的 Google Workspace for Education、Google Workspace for Nonprofits 或企业版中测试您的脚本。

  3. 删除您当前的 Google Workspace 帐户,然后等待 24 小时传播时间(否则您可能会看到一个错误,指出您的域名仍在使用中),然后使用仅限 Google Cloud Identity 免费许可证创建新帐户。这种免费订阅也有最初的 50 个用户上限,但是您可以使用此表格免费请求增加。请确保在登录管理员帐户时打开该链接,否则您将被重定向到主支持页面。请注意,此增加取决于您的域名声誉。

Cloud Identity Free 和常规 Google Workspace 订阅之间的主要区别在于用户无法访问某些服务,如 Gmail 或日历。

参考文献:

英文:

All paid Google Workspace subscriptions have an initial user cap of 50 users. The Business editions have a maximum users cap of 300, however to increase the initial user cap of 50 you need to contact support and paid in advance 50% of the total users you want to have.

Google Workspace for education, Google Workspace for Nonprofits, or Enterprise editions have a much higher initial cap and don't have a maximum amount of users that you can create.

Based on what you mentioned I can tell that you currently have a trial subscription because only trials have an initial cap of 10 users.
> My Google Workspace cannot have over 10 users.

When creating users in bulk Google Workspace has a built in protection system that can flag certain behaviors as abusive and lock the account to prevent spamming because the system thinks you want to use all those accounts for phishing or spam emails. As your account has a users cap of 10 and you attempted to create 1000 users that explains why the system detected this behavior as "abusive".

In this scenario you have 3 options:

  1. Contact Google Workspace Support to explain your situation so that they can submit a request internally and see if they can provide an exception and unlock the account. Just be advised that they will probably ask you to change to a paid Enterprise subscription due to the amount of users you want to create.

  2. Test your script in a working Google Workspace for Education, Google Workspace for Nonprofits, or Enterprise edition.

  3. Delete your current Google Workspace account, then wait 24h propagation time (otherwise you will probably see an error that your domain is still in use), and create a new one using only Google Cloud Identity Free licenses. This kind of free subscription also has an initial cap of 50 users, however you can request an increase for free using this form. Make sure to open that link while logged into an Admin account, otherwise you will be redirected to the main support page. And be aware that this increase would depend in your domain's reputation.

The main difference between Cloud Identity Free and a regular Google Workspace subscription is that the users do not have access to some services like Gmail or Calendar.

References:

huangapple
  • 本文由 发表于 2023年3月7日 16:45:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/75659696.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定