
60y4h (60y4h) asked a question.
We have a a custom registration system that uses the Okta API. For the last week we are getting this error in the registration process:
E0000014 error id: oaebHtw7PxOSU6iCT9xpQzNuw summary: Update of credentials failed. I find this strange because we are not updating the credentials; we are creating the record. After that we try to login. We also have a configuration that assigns groups based on a custom role field. Also, the user is created.Do you have any idea of what can be the problem?
Thanks in advance
There is more info. It seems that this happens when we are trying to update groups to a recently created user.
This is the function that calls the API. It is written in C# and it uses rest sharppublic Boolean AddUserToGroup(string UserID, string GroupID, out okErrorResponse okError)
{ okError = new okErrorResponse(); var client = new RestSharp.RestClient(sBaseUrl); var request = new RestSharp.RestRequest("api/v1/groups/{groupid}/users/{userid}", Method.PUT); request.AddUrlSegment("groupid", GroupID); request.AddUrlSegment("userid", UserID); request.AddHeader("Accept", "application/json"); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Authorization", "SSWS " + sOktaToken); request.RequestFormat = DataFormat.Json; RestSharp.Deserializers.JsonDeserializer deserial = new RestSharp.Deserializers.JsonDeserializer(); try { RestResponse response = (RestResponse)client.Execute(request); if (response.StatusCode == HttpStatusCode.NoContent) { okError.statusCode = response.StatusCode.ToString(); okError.DateTime = DateTime.Now.ToString(); return true; } else { okError = deserial.Deserialize<okErrorResponse>(response); okError.statusCode = response.StatusCode.ToString(); okError.DateTime = DateTime.Now.ToString(); ManageExceptions(okError,"AddUserToGroup"); return false; } } catch (Exception ex) { okError.statusCode = ex.Message; okError.DateTime = DateTime.Now.ToString(); ManageExceptions(ex, "AddUserToGroup"); //ExceptionUtility.ExceptionUtilityData.Log_Exception(ex, "AddUserToGroup", true, true, "OKTA Dll error"); return false; } }