title: Update CreatedBy(System.CreatedBy) workitem field in VSTS 2017
body: <p>We are unable to update CreatedBy(System.CreatedBy) workitem field in VSTS 2017 using rest API. The user has been added to "Project Collection Service Accounts" VSTS group in order to bypass the rules while updating the workitem.</p>
  
  <p>Link: <a href="https://github.com/Microsoft/vsts-dotnet-samples/blob/master/ClientLibrary/Snippets/Microsoft.TeamServices.Samples.Client/WorkItemTracking/WorkItemsSample.cs#L271" rel="nofollow noreferrer">https://github.com/Microsoft/vsts-dotnet-samples/blob/master/ClientLibrary/Snippets/Microsoft.TeamServices.Samples.Client/WorkItemTracking/WorkItemsSample.cs#L271</a> </p>
  
  <pre><code>public WorkItem UpdateWorkItemUsingByPassRules(int id)
      {
          JsonPatchDocument patchDocument = new JsonPatchDocument();
  
          patchDocument.Add(
              new JsonPatchOperation() { 
                  Operation = Operation.Add,
                  Path = "/fields/System.CreatedBy",
                  Value = "Foo &lt;Foo@hotmail.com&gt;"
              }
          );
  
          VssConnection connection = Context.Connection;
          WorkItemTrackingHttpClient workItemTrackingClient = connection.GetClient&lt;WorkItemTrackingHttpClient&gt;();
  
          WorkItem result = workItemTrackingClient.UpdateWorkItemAsync(patchDocument, id, null, true).Result;
  
          return result;
      }
  </code></pre>
  
  <p>When validateOnly parameter is set to true instead on null, then the result output holds the updated created by value.</p>