'G Suite Directory User creation is failing with the error - "Invalid Input: primary_user_email"
Issue:
Intermittently new user creation is not working. It is failing with the error - Invalid Input: primary_user_email
Account creation is stopping for both the Admin UI and API also
Is issue Reproducible?
We have automation in place which hits the G suite directory API for user/group/role - creation/modification/deletion. So when we have frequent and parallel executions of this automation we are seeing this issue. Please note when we don't encounter an issue at the user creating the automation runs smoothly and all the scenarios covered in it are executing properly
Observations
- We are not seeing this issue consistently
- Mostly after a window of 24 hours, we are able to create a new user once again with Admin UI and API also
- We are not reaching the API quotas which are available from the Google's end for 100 seconds and for 24 hours
- With the API connection, we are having 2 options - Client credentials(with offline refresh token) and service account approach - both of them have the same inconsistent issue
What we are feeling is that there might be some policies or limits for these API which are blocking the user creation. We have checked the docs available but didn't found any related info.
So we will like to know what actually triggering the user creation blockade so we can work accordingly
References
- Directory API used for user creation: https://www.googleapis.com/admin/directory/v1/users
- Google DOC we are following: https://developers.google.com/admin-sdk/directory/v1/guides/manage-users?refresh=1
Thank you !!
Solution 1:[1]
The action of creating and deleting users constantly in a short period of time will trigger an internal system flag at Google and the account will be prevented from these actions for a short time-frame(Approximately 24hrs). Basically this flag detects im-proper use of the API and to protect the infrastructure, user creation is blocked even for valid email addresses.
Solution 2:[2]
Seems that the issue you are encountering might be related to your G Suite account.
Therefore, the best solution in this situation is to contact G Suite Support here and choose the most convenient option for you.
Reference
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Prafull Pol |
Solution 2 | ale13 |