This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
This issue can only affect customers that was once on Badger before the new SyncEngine schema shipped in Update 7 and had SharePoint Group Providers with names longer than 50 characters
Running the Registration Wizard fails with an error that it cannot find a specific Provider Instance (Group Provider)
"20210737","2019-05-29 14:44:09","Error","General","0","ErrorMessage","SourceCode.Sync.Runtime.SyncService","0 Execute 'UpdateProviderInstanceStatus' Error : SP or PROVIDER NAME LONGER THAN 50 CHAR HERE.","anonymous","0.0.0.0","PVM-01536864:C:\K2\Slots\WGY4MIY\K2 blackpearl\Host Server\Bin","20210737","290aa246099f48e9bad9c5dc06e27e06",""
"20210739","2019-05-29 14:44:10","Error","System","2025","InternalMarshalError","SourceCode.Hosting.Server.Runtime.HostServerBroker.InternalMarshal","2025 Error Marshalling SourceCode.Hosting.Servers.SecurityManagement.RemoveLabelSecurityProvider, SP or PROVIDER NAME LONGER THAN 50 CHAR HERE not found.
at SourceCode.Sync.Storage.Sql.Repositories.SyncEngineRepository.UpdateProviderInstanceStatus(String providerName, String providerInstanceName, Boolean enabled)
at SourceCode.Sync.Runtime.Extensions.LogMethodExecution[T](ILogger logger, Func`1 methodFunc, String source, Boolean throwException, String methodName)
at SourceCode.Sync.Runtime.SyncService.UpdateProviderInstanceStatus(String providerName, String providerInstanceName, Boolean enabled)
at SourceCode.Sync.RuntimeMarshal.SecurityLabelConnector.DisableSpProviderInstance(String providerTypeName, String securityLabelName)
at SourceCode.Hosting.Server.Runtime.HostSecurityManager.UpdateSyncRuntimeConfig(String securityLabelName, String initData, Boolean disable)
at SourceCode.Hosting.Server.Runtime.HostSecurityManager.RemoveLabelSecurityProvider(String securityLabelName, String providerName)
You are unable to complete the Registration Wizard post K2 Cloud Update 8 upgrade.
During the Update 7 upgrade, all provider info was transferred from the old Badger schema to the new SyncEngine schema. Badger schema only allowed 50 characters for the Provider instance name and therefore truncated the name after 50 characters. This data was transferred to the SyncEngine schema in a truncated state. When running the registration wizard Provider Instances are queried based on the full name from Micro Service (Storage) and due to the fact that the name of the provider is truncated in the SyncEngine.ProviderInstance table, no match is found, and the error appears.
This is a legacy issue. To fix it the Name of the provider instance needs to be updated in the SyncEngine.ProviderInstance table and the Registration Wizard needs to be re-run.
Additional Script to help find the issue
The following Script will help find the possible Group Providers in this state, output will have the GroupProviders that doesn’t have a match in the SyncEngine.ProviderInstance table.
Ignore the Providers with Asterisk name (*)
Select * from [HostServer].[GroupProvider] where [Name] not in (Select [Name] from [SyncEngine].[ProviderInstance])
Note the Provider name that is returned and Query the SyncEngine.ProviderInstance table to find it.
Select * from [SyncEngine].[ProviderInstance] where [Name] like N’PROVIDERNAME BUT LESS THAN 50 CHARACTERS%’
Note the provider name from the SyncEngine.ProviderInstance table and update the record.
Set [Name] = 'Provider name from GroupProviderTable'
Where [Name] = 'ProviderName that is truncated from the ProviderInstance table'