title: Maintain affinity in Pull notifications using EWS managed API
body: <p>I need to notify on events in thousands of mailboxes to another system, I've created a pull notification subscription and it works great, I've created several of them but I need to GetEvents() from each one separately, then I read this article <a href="https://msdn.microsoft.com/EN-US/library/office/dn458789(v=exchg.150).aspx" rel="nofollow">How to: Maintain affinity between a group of subscriptions and the Mailbox server in Exchange</a> in the MSDN, it says I need to add headers to the subscriptions then I'll be able to getEvents() for all of them in one request, using the EWS managed API it should look like this:</p>
  
  <pre><code>service.HttpHeaders.Add("X-AnchorMailbox", Mailbox.SMTPAddress);
  service.HttpHeaders.Add("X-PreferServerAffinity", "true");
  </code></pre>
  
  <p>Then I should get back a cookie in the response: </p>
  
  <blockquote>
    <p>X-BackEndOverrideCookie</p>
  </blockquote>
  
  <p>I don't see the cookie in the response and I did not find anything in the article regarding how to obtain and use it in the EWS managed API (except those two lines above all the rest of the article is based on XML requests which I don't really like). besides that as far as the request it should include all the subscriptions id's (as seen in the XML) and for this I did not find a solution in the EWS managed API too.
  I've made this with the streaming notification solution but I would like to work with Pull notifications.</p>
  
  <p>If anyone has any experience with this I would love to hear. 
  Thanks in advance for the time you took in reading this and for your answers in case you've answered. </p>