Skip to main content
Nintex Community Menu Bar
Question

401 error when trying to Start Sync


I need to setup Sharepoint groups synchronization, so I am trying to setup Provider Schedule as per instruction below:

https://help.nintex.com/en-us/k2five/userguide/5.3/content/ServiceBrokers/SyncService/Sync-Service.htm

First I am trying to start a full sync, entering Provider Name (SP) and Provider Instance Name (as I got it setup)

Execution of Start Sync Method fails with the error in column AdditionalInfo in [SyncEngine].[RunHistory] table:

Error - The remote server returned an error: (401) Unauthorized.

   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)

   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

--- 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 Microsoft.SharePoint.Client.ClientRequest.<ExecuteQueryToServer>d__3.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 Microsoft.SharePoint.Client.ClientRequest.<ExecuteQuery>d__0.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 Microsoft.SharePoint.Client.ClientContext.<ExecuteQueryAsync>d__4.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 SourceCode.Sync.Providers.SP.Net.SpClientContext.ExecuteQuery()

   at SourceCode.Sync.Providers.SP.Net.ProviderQueryExecutor.<ExecuteQueryAsync>d__2.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 SourceCode.Sync.Providers.SP.SpoIdentityProvider.<SyncAsync>d__22.MoveNext()

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

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at SourceCode.Sync.Providers.SP.SpoIdentityProvider.<SyncAsync>d__22.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 SourceCode.Sync.SyncEngine.<InvokeAsync>d__9.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 SourceCode.Sync.SyncEngine.<StartProviderSyncAsync>d__8.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.GetResult()

   at SourceCode.Sync.Runtime.SyncLocalClient.<>c__DisplayClass20_0.<RunSyncJob>b__0()

   at SourceCode.Sync.Runtime.Extensions.<>c__DisplayClass2_0.<LogMethodExecution>b__0()

   at SourceCode.Sync.Runtime.Extensions.LogMethodExecution[T](ILogger logger, Func`1 methodFunc, String source, Boolean throwException, String methodName)

Inner - 

 

I checked settings in [SyncEngine].[ProviderInstanceRuntimeConfig] and it all appears fine.

Host server log shows only:

"29858993169","2025-02-04 11:51:45","Error","General","0","ErrorMessage","SourceCode.Sync.Runtime.SyncProviderLogger","0 EnvironmentId: eb80dec5-a436-410f-b2d3-1514b105edc0, Error - The remote server returned an error: (401) Unauthorized.","anonymous","0.0.0.0",

K2 For Sharepoint app is configured and deployed correctly. 

 

Currently installed version: K2 Five (5.6) (5.0007.1000.1)

Translate
Did this topic help you find an answer to your question?

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings