title: Mapping ID of Calendars as returned from Office 365 REST API to that returned by EWS API
body: <p>I am trying to find a way to map/convert the Id returned from Office 365 REST API (GET /calendars) to the Ids returned from EWS (list folders on DistinguishedFolderId="calendar") or vice-versa. </p>
  
  <p>I have noticed that for same calendar the Id returned from Office 365 API differs to that returned from EWS API.  </p>
  
  <pre><code>Office 365 API - 
  "AAMkADRlYTIyZTNiLWQ1ZjQtNGQwOS1hOGYzLTFjY2NkYzM4MzA2NwBGAAAAAAAhWNzR1hCyToyWVDoyJaPGBwAPTshXMc1wTqPkmdHO8phYAAAAAAEGAAAPTshXMc1wTqPkmdHO8phYAAB-AHbjAAA="
  
  EWS API - 
  "AAMkADRlYTIyZTNiLWQ1ZjQtNGQwOS1hOGYzLTFjY2NkYzM4MzA2NwAuAAAAAAAhWNzR1hCyToyWVDoyJaPGAQAPTshXMc1wTqPkmdHO8phYAAB/AHL6AAA="
  </code></pre>
  
  <p>I am unable to figure out a way for associating both. I want to have a clear mapping/conversion between these.  </p>
  
  <p><strong>Edit 1:</strong>
  It turns out that, Id returned from Office 365 REST API when used on EWS(after replacing '-' with '/' and '_' with '+'), corresponds to a Item of type 'Message' under some 'Common Views' folder. This looks to be a strange design.
  <strong>Is the replacement mentioned above sufficient? Or there are other characters that should be replaced?</strong></p>
  
  <p>P.S: </p>
  
  <ol>
  <li>I have already referred  to <code>http://stackoverflow.com/questions/30082306/mapping-office365-rest-calendar-ids-to-ews-calendaritem-ids</code>, but it does not work in my case(as the length of the Ids are different).</li>
  <li>I have seen this <a href="https://msdn.microsoft.com/en-us/library/office/bb799665(v=exchg.150).aspx" rel="nofollow noreferrer">doc</a> on ConvertId operation. But I am unable to understand how to apply it in this case. Because the Id I am using "RequestServerVersion Version="Exchange2010" which should be the version for Office 365 API also.</li>
  </ol>