Error creating ADSAccount with Account Definition

Hi All,

OneIM version it's 8.1

We have the next problem creating the ADSAccounts with an Account Definition:

ErrorMessages	(2020-05-29 12:05:31.517) [810023] Error during execution of statement: insert into QBMPwdHistory (DateInserted, HashValue, ObjectKeyAccount, UID_DialogColumn, UID_QBMPwdHistory, xobjectkey) values ('2020-05-29 12:05:31.327', N'P|E|LhlMjx9UkkwShjNncVv2v+in|ni/EB9zCGYo38olN7WJLT74JkETbERyjMATEcWIWNm4mzw0akgfmQnvixSkBvGlxA8QqhhjCcvg6XLSr', '<Key><T>ADSAccount</T><P>ef01395b-4fff-4978-b63f-6c14a0d24bf6</P></Key>', 'ADS-222C7583974C41E8AF59C20034B48432', 'f4731c85-5a90-49a6-83e0-8a2fcec531bc', '<Key><T>QBMPwdHistory</T><P>f4731c85-5a90-49a6-83e0-8a2fcec531bc</P></Key>')
[810143] Database error 50000: detected in (SRV=MPV-APP1IDDB01, DB=OneIMDB) Procedure GEN_T1EC48139AE7E14D6C89E12AA8, Line 11
[810143] Database error 50000: Cannot insert object in QBMPwdHistory because the associated object in UNSAccountB or Person or DialogUser or NDOUser or LDAPAccount or ADSAccount does not exist. Rule DynamicFK
   at VI.JobService.ProcessorThread._ExecuteJob(Job job, JobResult result)
   at VI.JobService.JobComponents.HandleObjectComponent.Activate(String task)
   at VI.DB.Implementation.HandleObjectKernel.Activate(String task)
   at VI.DB.Implementation.HandleObjectKernel._OperationInsert(IUnitOfWork optionalUnitOfWork)
   at VI.DB.Implementation.HandleObjectKernel._Save(IUnitOfWork unitOfWork, IEntity entity)
   at VI.Base.SyncActions.Do(Func`1 action)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   ---- Start of Inner Exception ----
   at VI.DB.Entities.UnitOfWorkImpl.<CommitAsync>d__41.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.Entities.UnitOfWorkImpl.<FlushAsync>d__40.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.Entities.DbEntitySink.<FlushAsync>d__17.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.Entities.DbOperations.ClusteringDbOperationsQueue.<FlushAsync>d__30.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.Entities.DbOperations.ClusteringDbOperationsQueue.<_FlushInternalAsync>d__31.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.Entities.DbOperations.ClusteringDbOperationsQueue.<_FlushInternalAsync>d__31.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.Entities.DbOperations.ClusteringDbOperationsQueue.<_DoInsertsAsync>d__34.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.Entities.DbOperations.ClusteringDbOperationsQueue.<_RunSingleAsync>d__41.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.DataAccess.ReadWriteDbSession.<SqlExecuteNonQueryAsync>d__14.MoveNext()
   ---- Start of Inner Exception ----
   at VI.DB.DataAccess.ReadWriteDbSession.<SqlExecuteNonQueryAsync>d__14.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.DataAccess.ReadWriteDbSession.<IgnoreBrokenConnectionAsync>d__46`1.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.DataAccess.ReadWriteDbSession.<_SqlExecuteNonQueryAsync>d__15.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.DataAccess.ReadOnlyDbSession.<ExecuteAndLogAsync>d__95`1.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.DataAccess.ReadOnlyDbSession.<ExecuteAndLogAsync>d__96`1.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.DataAccess.SafeDbCommand.<ExecuteNonQueryAsync>d__16.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
--- End of stack trace from previous location where exception was thrown ---
   at VI.DB.DataAccess.SafeDbCommand.<_CheckedAsync>d__40`1.MoveNext()
   ---- Start of Inner Exception ----

This error is generated when the following task is launched: "ADS_PersonHasTSBAccountDef_Autocreate_ADSAccount"

Any ideas or help will be very welcome because we have tried many options and changes without any result.

Thanks in advance.

Regards.