Search code examples
exchangewebservicesactivesync

Translate ActiveSync Mailbox id to EWS folder id


Do you know if it is possible to translate ActiveSync (calendar) Mailbox id to EWS folder id. My main sync task uses Activesync protocol but for certain tasks I need to use EWS protocol. For now I used GUID of meeting to find out EWS instance of same meeting but since EWS does not support "deep" searching, firstly i need to find folder where this meeting is. All i have is Active Sync mailbox id, it's parent mailbox id and display name which is not unique.

Does ActiveSync support some translate feature where I can reciveve EWS folder id and change key?

I need server respond in form like that:

FolderId Id="AAMkADc2NTc1MDc2LWU1YXXXXXXXXXXXXWRiMjlmNDgwNjkxZAAuAAAAAADwSBYV6TcMQa7GjEF/TzXXXXXXXXXXXXXXXICzAAA=" ChangeKey="AgXXXXXXXXXXXXXXXXXXXXXACw=="/>

Solution

  • Only solution which I can think of is

    1. Send SyncFolderHierarchy request using EWS, this will return list of folders in EWS.
    2. Construct tree hierarchy using folder display name like Inbox/Folder1/Folder2 from both ActiveSync folders and EWS folders.
    3. Create a mapping locally in client from ActiveSync folder ID to EWS folder id using above mapping.