title: Getting "Value does not fall within the expected range" when creating a new discussion with CSOM
body: <p>I'm using the SharePoint 2013 client object model.</p>
  
  <p>I'm getting a Microsoft.SharePoint.Client.ServerException that says: "Value does not fall within the expected range" when running _context.ExecuteQuery(). The code works as long as I comment out the statement <code>entry["Author"] = authorValue;</code>:</p>
  
  <pre><code>entry["Body"] = post.Body;
  entry["Created"] = post.Created;
  entry["Modified"] = post.Modified;
  
  FieldUserValue authorValue = new FieldUserValue();
  User author = _context.Web.EnsureUser("Mr. X");
  _context.Load(author);
  _context.ExecuteQuery();
  authorValue.LookupId = author.Id;
  
  entry["Author"] = authorValue;
  
  entry.Update();
  _context.ExecuteQuery();
  </code></pre>
  
  <p>"Author" is a valid field name. I also read about increasing "List View Lookup Threshold" to a value of 20 in <a href="http://dotnetfollower.com/wordpress/2012/05/sharepoint-value-does-not-fall-within-the-expected-range-exception-in-spfieldmap-getcolumnnumber/" rel="nofollow">http://dotnetfollower.com/wordpress/2012/05/sharepoint-value-does-not-fall-within-the-expected-range-exception-in-spfieldmap-getcolumnnumber/</a>. But that value is already set to 5000.</p>
  
  <p>I also checked the value of <code>entry["Author"]</code> without setting it explicitly (<code>entry["Author"] = authorValue</code> commented out) by adding this two statements:</p>
  
  <pre><code>_context.Load(entry);
  _context.ExecuteQuery();
  </code></pre>
  
  <p>It is of type <code>Microsoft.SharePoint.Client.FieldUserValue</code> and it's <code>LookupId</code> property value is equal to <code>authorValue.LookupId</code>.</p>
  
  <p>What did I miss?</p>