Attempting to connect to the SourceCode.Workflow.Client API with static credentials results in error ClientException: Authentication failed for user K2Service
Issue
Attempting to connect to the SourceCode.Workflow.Client API with static credentials results in error:
"ClientException: Authentication failed for user K2Service
SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder builder = new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();
builder.Authenticate = true;
builder.Host = "k2.denallix.com";
builder.Port = 5252;
builder.Integrated = false;
builder.IsPrimaryLogin = true;
builder.SecurityLabelName = "K2";
builder.WindowsDomain = "DENALLIX";
builder.UserID = "K2Service";
builder.Password = {password}";
SourceCode.Workflow.Client.Connection WorkflowClientConnection = new SourceCode.Workflow.Client.Connection();
WorkflowClientConnection.Open("k2.denallix.com", builder.ConnectionString);"
Symptoms
Although the WindowsDomain field is specified, the UserID field is expecting a string in the format "DOMAINusername".
Resolution
Specify the UserID in the 'DOMAINusername' format, i.e.: