Google Admin SDK API – HttpError 412 “域用户限制已达到。请联系支持。”

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

Google Admin SDK API - HttpError 412 "Domain user limit reached. Contact Support."

问题

我想进行一个负载测试,测试一个创建Google Workspace用户的Python脚本。负载测试的目的是确认可以成功创建100个用户使用 "Google_add.py"。然而,我遇到了以下错误。

googleapiclient.errors.HttpError: <HttpError 412 when requesting https://admin.googleapis.com/admin/directory/v1/users?alt=json returned "Domain user limit reached. Contact Support.">

我进行的负载测试和结果

①创建50个用户→OK

②创建100个用户→只有前10个用户成功创建,其他的出现了上述HttpError。

我的许可证

Google Workspace Business Starter
在我理解中,这个许可证可以创建最多300个用户。

问题

①什么是 "域用户限制"?

②我如何避免这个错误?

英文:

I want to perform a load test of a python script which creates users in the GoogleWorkspace. The purpose of the load test is to confirm that 100 users can be created successfully using "Google_add.py".However, I faced the following Error.

>googleapiclient.errors.HttpError: <HttpError 412 when requesting https://admin.googleapis.com/admin/directory/v1/users?alt=json returned "Domain user limit reached. Contact Support.">

the load test I did and the result

①To create 50users →OK

②To create 100users →only the first 10 users were successfully created, and the others raised the above HttpError.

My license

Google Workspace Business Starter
In my recognition, up to 300users can be created by this lisence.

Questions

①What is "Domain user limit"?

②How can I avoid this error?

答案1

得分: 1

I remember that I had this error before, reviewing the documentation from Google here, I found this information.

<h4>Note: It makes reference to an API for resellers, on our case since we do not have access to use the reseller API it's best to contact support.</h4>

> This error occurs when your customer has reached their maximum seat
> limit. To resolve this issue, Use the subscriptions.changeSeats method
> and depending on their subscription plan, use the following:
>
> For FLEXIBLE, increase the maximumNumberOfSeats parameter.
> For ANNUAL, increase the numberOfSeats parameter.

If the issue is actually the number of seats you can actually contact Google Workspace support, and they can increase the number for you. Is a very simple process, and that one worked for me with this error.

However, if you are 100% sure that you didn’t reach the Maximum number of seats, you might have reached a quota limit for the Directory API.

> You cannot create more than 10 users per domain per second using the Directory API.

You can solve that issue by implementing Exponential Backoff.

As an extra advice, be careful when testing the creation of users in Google Workspace. When I was getting that error I kept testing by deleting users and creating new ones and I reached a different error message A request for user account creation is disallowed as we&#39;ve detected some potentially abusive behavior. Please contact Google support for help.

For that error it is best to contact support, explain that you are running some tests of creation of users, and if they can remove the ban for you.

英文:

I remember that I had this error before, reviewing the documentation from Google here, I found this information.

<h4>Note: It makes reference to an API for resellers, on our case since we do not have access to use the reseller API it's best to contact support.</h4>

> This error occurs when your customer has reached their maximum seat
> limit. To resolve this issue, Use the subscriptions.changeSeats method
> and depending on their subscription plan, use the following:
>
> For FLEXIBLE, increase the maximumNumberOfSeats parameter.
> For ANNUAL, increase the numberOfSeats parameter.

If the issue is actually the number of seats you can actually contact Google Workspace support, and they can increase the number for you. Is a very simple process, and that one worked for me with this error.

However, if you are 100% sure that you didn’t reach the Maximum number of seats, you might have reached a quota limit for the Directory API.

> You cannot create more than 10 users per domain per second using the Directory API.

You can solved that issue by implementing Exponential Backoff.

As an extra advice, be careful when testing the creation of users in Google Workspace. When I was getting that error I kept testing by deleting users and creating new ones and I reached a different error message A request for user account creation is disallowed as we&#39;ve detected some potentially abusive behavior. Please contact Google support for help.

For that error it is best to contact support, explain that you are running some tests of creation of users, and if they can remove the ban for you.

huangapple
  • 本文由 发表于 2023年4月17日 12:27:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76031716.html
匿名

发表评论

匿名网友

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

确定