Closed JakobQv closed 2 months ago
@JakobQv
It's just a terrible API. We've created the user, and then made a follow-up API call to set the password, and whatever endpoint we are hitting on the second call doesn't think that users exists. It hasnt replicated through their system for whatever reason.
We've seen this before, and it tends to be transient - eg something goes wrong on the google back end and its inconsistent for a while and then goes back to normal.
I'll check in with some other users and see if they are seeing this at the moment as well.
@ryannewington Thanks for the quick response, in this particular environment the issue appeared in late January and has persisted since so I'm not very hopeful that it will resolve itself.
@JakobQv
I've modified the agent to perform a backoff/retry when setting a user password and encountering a 404. Try this test build and see if its any better
https://github.com/lithnet/googleapps-managementagent/releases/tag/v2.2.1
@ryannewington I will implement it ASAP and let you know how it goes, thanks!
@ryannewington Got a different error now.
2024-04-10 08:42:32: Error setting password for user@contoso.com
An exception has occurred in SetPassword Type: Google.GoogleApiException
Message: Google.Apis.Requests.RequestError Required parameter: [resource.name.field] [400] Errors [ Message[Required parameter: [resource.name.field]] Location[ - ] Reason[required] Domain[global] ]
Source: Google.Apis
TargetSite: Void MoveNext()
StackTrace:
at Google.Apis.Requests.ClientServiceRequest1.<ParseResponse>d__35.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Google.Apis.Requests.ClientServiceRequest
1.1 request, Func
2 shouldRetry, Int32 retryAttempts, Int32 consumeTokens)
at Lithnet.GoogleApps.UserRequestFactory.SetPassword(String id, SecureString newPassword)
at Lithnet.GoogleApps.MA.ManagementAgent.SetPassword(CSEntry csentry, SecureString newPassword, PasswordOptions options)
that... shouldn't have anything to do with the change that I made. very confused
Are you getting that on any and all password changes, or is it working for some but not all?
Three accounts have been created so far, the first two failed with the same error and the third was successful
What version were you on prior to this? If you rollback to that version, does the error message stay the same, or revert back to the old one?
Sorry about the delayed response. Version 2.1.7857, rolling back to that version produces the old error "Errors [ Message[Resource Not Found: userKey] Location[ - ] Reason[notFound] Domain[global] ]"
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.
Recently we have started getting errors related to the initial flow of password when creating an account, sometimes it works but most of the times it fails with below error, the account is created in Google but the password is not set. Any idea what might be wrong?
2024-04-08 11:42:08: Error setting password for user@contoso.com
An exception has occurred in SetPassword Type: Google.GoogleApiException Message: Google.Apis.Requests.RequestError Resource Not Found: userKey [404] Errors [ Message[Resource Not Found: userKey] Location[ - ] Reason[notFound] Domain[global] ] Source: Google.Apis TargetSite: Void MoveNext() StackTrace: at Google.Apis.Requests.ClientServiceRequestd27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Google.Apis.Requests.ClientServiceRequest`1.d 26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter
1.<ParseResponse>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Google.Apis.Requests.ClientServiceRequest
1.1.GetResult() at Lithnet.GoogleApps.ApiExtensions.ExecuteWithRetry[T](ClientServiceRequest
1 request, Func2 shouldRetry, Int32 retryAttempts, Int32 consumeTokens) at Lithnet.GoogleApps.ApiExtensions.ExecuteWithRetry[T](ClientServiceRequest
1 request, RetryEvents policy, Int32 retryAttempts, Int32 consumeTokens) at Lithnet.GoogleApps.ApiExtensions.ExecuteWithRetryOnBackoff[T](ClientServiceRequest1 request, Int32 retryAttempts, Int32 consumeTokens) at Lithnet.GoogleApps.ApiExtensions.ExecuteWithRetryOnBackoff[T](ClientServiceRequest
1 request, Int32 retryAttempts) at Lithnet.GoogleApps.ApiExtensions.ExecuteWithRetryOnBackoff[T](ClientServiceRequest`1 request) at Lithnet.GoogleApps.UserRequestFactory.SetPassword(String id, SecureString newPassword) at Lithnet.GoogleApps.MA.ManagementAgent.SetPassword(CSEntry csentry, SecureString newPassword, PasswordOptions options) in D:\dev\git\lithnet\googleapps-managementagent\src\Lithnet.GoogleApps.MA\ManagementAgent.cs:line 583