Ad Group synchronization error

Hi all

I have to run a synchronization involving AD Groups and AccProduct table. In details, once a given group is read from AD, I need to find a Product in the AccProduct Table with Ident_AccProduct equals to SamAccountName of the group.

This procedure is pretty simple and it works fine against hundreds of groups except when in the following case: the Group’s SamAccountName is something like xxxxxx$MISERVER$xxxx.

The query I implemented to get the AccProduct is as following:

 Dim AccProdObjectResult = SystemObject.Connection.QueryObject(SystemQuery _
   .From("AccProduct") _
   .Select("CustomProperty01","UID_AccProduct") _
   .Filter("Ident_AccProduct = '" &  cstr(AccProd) & "'" )
   ).Result

 

where AccProd is equal to xxxxxx$MISERVER$xxxx.

the exception message is " Error loading system objects of class AccProduct (all) (AccProduct_Master)."

I’m afraid this error is related to the $----$ chars into the SamAccountName

I've also tried something like 

 Dim AccProdObjectResult = SystemObject.Connection.QueryObject(SystemQuery _
   .From("AccProduct") _
   .Select("CustomProperty01","UID_AccProduct") _
   .Filter("Ident_AccProduct = '" & cstr(AccProd) & "'" )
   ).Result
 

and like 

  Dim AccProdObjectResult = SystemObject.Connection.QueryObject( SystemQuery _     .From("AccProduct") _     .Select("CustomProperty01","UID_AccProduct") _     .Filter(String.Format("Ident_AccProduct = '{0}'",cstr(AccProd) ))     ).Result

 

but nothing changes.

Please can someone advices me about how to solve this issue?

Parents Reply Children
  • Hi Markus,

    thanks for your reply.

    The current version is 8.0

    Unfortunately, the only log I can get is as following.

    I think the most relevant line is “[1777260] Unknown variable (MISERVER)!”. And MiServer appears only once, in the SamAccountName of the role xxxxxxxxxxxxxxxxxxxxx$MISERVER$yyyyyyy.

    I’m SURE, from my logs, that the problem happens in the very moment the query is executed, as I’m sure the variable AccProd contains the right string xxxxxxxxxxxxxxxxxxxxx$MISERVER$yyyyyyy, as I printed it everywhere in my logs.

    Anyway, here the interesting part of the logs:

    [2134003] Error executing synchronization.

        [1777018] Error executing synchronization project (Active Directory Domain (DC=PROD,DC=LABxxxxxxxxxxx,DC=YY))'s workflow (Initial Synchronization).

        [1777124] Error executing projection step (group) of projection configuration (Initial Synchronization (Initial Synchronization)).

        [1777219] Error executing synchronization step (group)!

        [1777239] The mapping rule (vrt_matchpattern <-> SAM-Account-Name) was unable to execute synchronization between system objects (xxxxxxxxxxxxxxxxxxxxx$MISERVER$yyyyyyy) and (CN=xxxxxxxxxxxxxxxxxxxxx$MISERVER$yyyyyyy,OU=Groups,DC=prod,DC=labxxxxxxxxxxx,DC=ch) successfully!

        [1777161] Property (vrt_matchpattern@ADSGroup) could not set the value (xxxxxxxxxxxxxxxxxxxxx$MISERVER$yyyyyyy) from system object (xxxxxxxxxxxxxxxxxxxxx$MISERVER$yyyyyyy)!

        [1777207] Error executing 'Set' script for (vrt_matchpattern@ADSGroup)!

        [System.Reflection.TargetInvocationException] Exception has been thrown by the target of an invocation.

        [1777009] Error loading system objects of class AccProduct (all) (AccProduct_Master).

        [1777260] Unknown variable (MISERVER)!                        <*******************************************************************************************************************

           at StdioProcessor.StdioProcessor._Execute(Job job)

           at VI.Projector.JobComponent.ProjectorComponent.Activate(String task)

           at VI.Projector.JobComponent.ProjectorComponent._FullProjection()

           ---- Start of Inner Exception ----

           at VI.Projector.JobComponent.ProjectorComponent._FullProjection()

           at VI.Projector.Database.ProjectorExecutor.Project(ISession session, IProjectionConfiguration configuration, ProjectionOption options, ISystemObject adHocObject, CancellationToken cancellationToken)

           at VI.Projector.Projection.Extensions.Execute(IProjectorEngine engine, IProjectionConfiguration configuration, ProjectionOption options, ISystemObject adHocObject, CancellationToken cancellationToken)

           at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

           ---- Start of Inner Exception ----

           at VI.Projector.Projection.ProjectorEngine.<ExecuteAsync>d__3.MoveNext()

           ---- Start of Inner Exception ----

           at VI.Projector.Projection.ProjectorEngine.<ExecuteAsync>d__3.MoveNext()

           ---- Start of Inner Exception ----

           at VI.Projector.Projection.ProjectorEngine.<ExecuteAsync>d__3.MoveNext()

           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

        --- End of stack trace from previous location where exception was thrown ---

           at VI.Projector.Projection.ProjectionStrategy.<ExecuteStepAsync>d__2.MoveNext()

           ---- Start of Inner Exception ----

           at VI.Projector.Projection.ProjectionStrategy.<ExecuteStepAsync>d__2.MoveNext()

           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

        --- End of stack trace from previous location where exception was thrown ---

           at VI.Projector.Projection.ProjectionStrategyBase.<OnExecuteStepAsync>d__2.MoveNext()

           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

        --- End of stack trace from previous location where exception was thrown ---

           at VI.Projector.Projection.ProjectionStrategyBase.<_ProcessIntersectionSetAsync>d__17.MoveNext()

           at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

        --- End of stack trace from previous location where exception was thrown ---

           at VI.Projector.Projection.ProjectionStrategyBase.<_ProcessMappingOfSystemObjectPairsAsync>d__21.MoveNext()

           at VI.Projector.Mapping.Extensions.MapObjects(ISystemMap map, IEnumerable`1 pairs, SystemMappingOptions options)

           at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)

           at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)

           at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)

           at System.Threading.Tasks.Task.Wait()

           at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)

           ---- Start of Inner Exception ----

           at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)

           at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)

           at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()

           at VI.Projector.Mapping.Extensions.<>c__DisplayClass6_0.<MapObjects>b__0(SystemObjectMatchingPair pair)

           at VI.Projector.Mapping.SystemMappingRule.ApplyMapping(ISystemObject leftObject, ISystemObject rightObject, SystemMappingOptions options)

           ---- Start of Inner Exception ----

           at VI.Projector.Mapping.SystemMappingRule.ApplyMapping(ISystemObject leftObject, ISystemObject rightObject, SystemMappingOptions options)

           at VI.Projector.Mapping.Rules.SinglePropertyComparisonRule.OnApplyMapping(ISystemObject leftObject, ISystemObject rightObject, SystemMappingOptions options)

           at VI.Projector.Mapping.Rules.SinglePropertyComparisonRule._SetValue(ISystemObject systemObject, ISchemaProperty targetProperty, Object value, Boolean handleAsSingleValue, Boolean isSecretValue, Boolean projectExamples, Boolean reportDataChanges, Func`1 getTargetValue)

           at VI.Projector.Schema.SchemaProperty.SetValue(ISystemObject systemObject, Object value, SchemaPropertySetValueOption option)

           ---- Start of Inner Exception ----

           at VI.Projector.Schema.SchemaProperty.SetValue(ISystemObject systemObject, Object value, SchemaPropertySetValueOption option)

           at VI.Projector.Schema.Properties.ScriptedSchemaProperty.OnSetValue(ISystemObject systemObject, Object outerValue, SchemaPropertySetValueOption option)

           ---- Start of Inner Exception ----

           at VI.Projector.Schema.Properties.ScriptedSchemaProperty.OnSetValue(ISystemObject systemObject, Object outerValue, SchemaPropertySetValueOption option)

           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

           at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

           ---- Start of Inner Exception ----

           at VI.Projector.Scripting.ProjectorScripts.Setvrt_matchpatternd0706677_f7ec_47ba_a774_a6c810cacf7b(ISchemaProperty& schemaProperty, String& value, SchemaPropertySetValueOption& options)

           at VI.Projector.Connection.SystemConnection.QueryObjectInternal(ISchemaClass schemaClass, QueryByFilterOptions query, Boolean withScope)

           ---- Start of Inner Exception ----

           at VI.Projector.Connection.SystemConnection.QueryObjectInternal(ISchemaClass schemaClass, QueryByFilterOptions query, Boolean withScope)

           at VI.Projector.Filter.SystemObjectFilterJoin.Finalize(ISystemVariableSet variables)

           at VI.Projector.Filter.SystemObjectNativeSystemFilter.OnFinalize(ISystemVariableSet variables)

           at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator)

           at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat)

           at VI.Projector.Internal.ValueReplacer._FindVarForMatch(Match match)

     

     Please, I beg some advices...

    Thanks in advance,

    Alberto