I'm looking for a way to add a comment to a work item on behalf of another user (impersonate another user).
VssConnection connection = new VssConnection(new Uri(url), new VssClientCredentials());
WorkItemTrackingHttpClient client = connection.GetClient<WorkItemTrackingHttpClient>();
patchDocument.Add(
new JsonPatchOperation()
{
Operation = Operation.Add,
Path = "/fields/System.History",
Value = "Sample comment 1"
}
);
await client.UpdateWorkItemAsync(patchDocument, id);