none
Why doesn't using EAS to sync Drafts from server to client work anymore? RRS feed

  • Question

  • Hi All,

    I understand that uploading an email into a Drafts folder is not possible and has never been possible using Exchange ActiveSync.

    It has always been possible, however, to download emails from the Drafts folder and to sync the Drafts folder like any other folder. Recently, however, I have been having problems performing this sync. These problems are occuring on Office-365. Other users are also experiencing the issue. There is a thread discussing this issue  on that site at: http://community.office365.com/en-us/forums/158/p/176113/525322.aspx#525322 

    Unfortunately, there is still no resolution forthcoming from the Office-365 support team, so I thought it might help to cross-post the problem here.

    In short, the problem that I am seeing is that the GetItemEstimate command receives a Status of 4 indicating an invalid sync key. This is even though the Sync Key is known the be valid. If that issue is ignored, and a Sync command is sent, then there is no error, but the incorrect information is returned. The information that should be returned is the 'Adds' for the folder. Instead, an empty reply is received, indicating that there is nothing to sync.

    Here are the details from the interaction:

    =================
     [EAS] Client Sends: 
    ================
    <Sync xmlns="AirSync:">
        <Collections>
            <Collection>
                <SyncKey>0</SyncKey>
                <CollectionId>4</CollectionId>
            </Collection>
        </Collections>
    </Sync>

    ======================
    [EAS] Received from Server
    ======================
    <Sync>
        <Collections>
            <Collection>
                <SyncKey>1335200247</SyncKey>
                <CollectionId>4</CollectionId>
                <Status>1</Status>
            </Collection>
        </Collections>
    </Sync>
    =================
     [EAS] Client Sends:
    =================
    <GetItemEstimate xmlns="GetItemEstimate:">
        <Collections>
            <Collection>
                <airsync:SyncKey>1335200247</airsync:SyncKey>
                <CollectionId>4</CollectionId>
            </Collection>
        </Collections>
    </GetItemEstimate>

    ======================
     [EAS] Received from Server
    ======================
    <GetItemEstimate>
        <Response>
            <Status>4</Status>        
            <Collection>
                <CollectionId>4</CollectionId>
            </Collection>
        </Response>
    </GetItemEstimate>


    ================
    [EAS] Client Sends
    ================
    <Sync xmlns="AirSync:">
        <Collections>
            <Collection>
                <SyncKey>1335200247</SyncKey>
                <CollectionId>4</CollectionId>
                <DeletesAsMoves/>
                <GetChanges/>
                <WindowSize>64</WindowSize>
                <Options>
                    <airsync:MIMESupport>2</airsync:MIMESupport>
                </Options>
            </Collection>
        </Collections>
    </Sync>
     
    =====================================
    This receives an empty reply indicating no changes
    Here are the HTTP Headers:
    =====================================
    Headers: {
        "Cache-Control" = private;
        "Content-Encoding" = gzip;
        "Content-Length" = 119;
        "Content-Type" = "application/vnd.ms-sync.wbxml";
        Date = "Fri, 19 Jul 2013 22:31:47 GMT";
        "MS-Server-ActiveSync" = "15.0";
        Server = "Microsoft-IIS/7.5";
        "Set-Cookie" = "X-BackEndCookie=S-1-5-21-2447848828-1310731447-1641304557-13231500=u56Lnp2ejJqBz83MmsfNncnSzJnGztLLyMfP0p7Nxp3Szs/HycjPzJrIy5ybgZiQkJuXipKekYzRkJGSlpyNkIyQmYvRnJCSgcjQzsbQzc/OzN/Oz8XLzsXLyN+vsg==; expires=Fri, 19-Jul-2013 22:41:47 GMT; path=/Microsoft-Server-ActiveSync; secure; HttpOnly";
        Vary = "Accept-Encoding";
        "X-AspNet-Version" = "4.0.30319";
        "X-BEServer" = BN1PR05MB121;
        "X-CalculatedBETarget" = "bn1pr05mb121.namprd05.prod.outlook.com";
        "X-DiagInfo" = BN1PR05MB121;
        "X-FEServer" = BY2PR09CA003;
        "X-Powered-By" = "ASP.NET";
        "request-id" = "b78e1afc-74b4-4080-a8b2-c641f567d4f9";
    }
    Cookies: (
        "<NSHTTPCookie version:0 name:\"X-BackEndCookie\" value:\"S-1-5-21-2447848828-1310731447-1641304557-13231500=u56Lnp2ejJqBz83MmsfNncnSzJnGztLLyMfP0p7Nxp3Szs/HycjPzJrIy5ybgZiQkJuXipKekYzRkJGSlpyNkIyQmYvRnJCSgcjQzsbQzc/OzN/Oz8XLzsXLyN+vsg==\" expiresDate:2013-07-19 22:41:47 +0000 created:2013-07-19 22:31:47 +0000 (3.95966e+08) sessionOnly:FALSE domain:\"outlook.office365.com\" path:\"/Microsoft-Server-ActiveSync\" isSecure:TRUE>"
    )

    Thanks!

        -Rich
    Monday, August 12, 2013 5:17 PM

Answers

  • For the benefit of the community here,

    The specification has been clear that syncing the Drafts folder should not be performed, i.e. [MS-ASCMD] 3.1.5.4:

    "Clients SHOULD NOT synchronize the Drafts folder."

    However, historically this was not strictly enforced and at some point, limited functionality (a loophole) was discovered allowing clients to sync Drafts messages from the server.  Changes on the client would not affect the server Drafts messages. When reports that EAS Drafts folder sync on devices was not "working", we realized this was being done and that it appeared to the users as an incomplete functional scenario.  To implement the complete scenario as users expected was not a trivial task and therefore, we chose to close the loophole that allowed it until a true Drafts folder sync could be implemented.

    Going forward we want to deliver true Drafts folder sync functionality because we see this as an important feature now that devices are more capable email editing tools. In order to provide this, schema changes are required in the protocol, meaning only new protocol versions will contain the ability, and subsequently clients will require changes to support the scenario.

    Best regards,
    Tom Jebo
    Supportability PM
    Microsoft Open Specifications

    Wednesday, July 2, 2014 6:10 PM
    Moderator
  • Hi Rich,

    It turns out that this is expected behavior. Office 365 is explicitly blocking drafts sync (this change was put in a month or two ago).  When it sees an attempt to sync Drafts, it returns an empty collection. 

    The Office 365 team has been made aware of this forum thread so thank you for raising the issue here. 

    Tom

    Thursday, September 5, 2013 11:12 PM
    Moderator
  • Hi Bill,

    Again, thanks for asking about the Drafts folder synchronization functionality.  I’ve heard from the product team and although we can’t commit to a time frame before a formal product announcement, we are still considering the functionality for an upcoming release.

    Tom

    Wednesday, October 15, 2014 5:05 PM
    Moderator

All replies

  • Rich,

    Thank you for this inquiry. One of our engineers will review this and follow-up soon.

    Thanks,

    Edgar

    Monday, August 12, 2013 6:39 PM
    Moderator
  • Hi Rich,

    I'll look into this for you.  As you already know, I'm sure, this is likely a server behavior issue but perhaps we can she some light on it with our resources.  I let you know what I find.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Tuesday, August 13, 2013 12:05 AM
    Moderator
  • Hi Rich,

    Just an update to let you know that I'm still working on this. I hope to have something for you soon.

    Tom

    Monday, August 26, 2013 7:09 PM
    Moderator
  • Hi Tom,

    Thanks for the update and for your continued help in getting this issue resolved. It is much appreciated.

    -Rich

    Wednesday, August 28, 2013 5:53 PM
  • Hi Rich,

    It turns out that this is expected behavior. Office 365 is explicitly blocking drafts sync (this change was put in a month or two ago).  When it sees an attempt to sync Drafts, it returns an empty collection. 

    The Office 365 team has been made aware of this forum thread so thank you for raising the issue here. 

    Tom

    Thursday, September 5, 2013 11:12 PM
    Moderator
  • Hi Tom,

    Thanks for following up on this and providing a definitive answer. It is much appreciated.

    The decision they have made to block the Drafts folder syncing is mildly disappointing.

    Unfortunately, the mechanism by which they are implementing this makes it a more serious issue.

    Specifically, they should not be returning a Status of 4 in response to the GetItemEstimate for the Drafts folder. That Status of 4 effectively says, "Try Again".  See section 2.2.3.162.6 of the MS-ASCMD document.

    Instead, they should probably return a Status of 1 and an Estimate of 0. This would be the appropriate match with their empty collection in response to the Sync command.

    Alternatively, they could return a Status of 2 indicating, "an incorrect folder was requested". 

    Or they could simply omit the folder from the FolderHierarchy response.

    By returning a 4 and requesting that the client try again, they can cause the client to enter a continuous (and infinite) stream of GetItemEstimate requests. By following the documentation from 2.2.3.162.6, a client would get into this loop:

    1) GetItemEstimate returns 'Invalid sync key'

    2) FolderSync returns status OK 

    3) GetItemEstimate returns 'Invalid sync key'

    4) FolderSync with syncKey 0  returns Status OK

    5) goto 1

    Thanks,

        -Rich

    Friday, September 6, 2013 3:57 AM
  • Thank you Rich for the feedback.  I will pass this on to the Exchange team. 

    Tom

    Friday, September 6, 2013 5:53 AM
    Moderator
  • Hi Any time given for a satisfactory resolution? Thanks for your efforts, Moerice
    Tuesday, October 8, 2013 3:39 AM
  • Hi Moerice,

    No, there is currently no timeline for a change to the draft folder behavior in Office 365.  The Office team has been made aware of the feedback comments made by Rich above. 

    Thanks,
    Tom Jebo
    Micrsoft Open Specifications

    Tuesday, October 8, 2013 5:46 AM
    Moderator
  • Thanks, Tom

    Your effort are much appreciated.

    Friday, October 11, 2013 2:18 AM
  • Not being able to get draft emails is a significant loss of functionality for me, and I presume others.  It's where I keep all my reference information for example.

    Is there a workaround - perhaps accessing the account through a web-interface on mobile devices?

    Update - I checked, and the Outlook365 web-interface works on my iphone 4s w/ios7, using Atomic Web browser.  Not ideal, but works in a pinch.  If you are like me and have many draft emails it helps if you set the options to display the maximum number of messages at one time, 100.

    Tuesday, November 12, 2013 4:10 PM
  • This doesn't make sense. Our company is using Office365 and we have never experienced any issues with items not syncing between the server (viewable in web app) and Outlook.

    *** HOWEVER.... mail items in the drafts folder do NOT sync with the mail app in Windows 8/RT, which is quite annoying.

    Doesn't sound like a limitation in the EAS protocol. Sounds like a limitation in the mail app?

    Tuesday, November 19, 2013 11:12 PM
  • Can we get a status report?  I have a Samsung s5 using the Droid email client.

    Wednesday, June 25, 2014 3:23 PM
  • I am experiencing the same problem on an android tablet and find it completely incomprehensible why you would exclude the drafts folder!

    Thursday, June 26, 2014 7:57 AM
  • For the benefit of the community here,

    The specification has been clear that syncing the Drafts folder should not be performed, i.e. [MS-ASCMD] 3.1.5.4:

    "Clients SHOULD NOT synchronize the Drafts folder."

    However, historically this was not strictly enforced and at some point, limited functionality (a loophole) was discovered allowing clients to sync Drafts messages from the server.  Changes on the client would not affect the server Drafts messages. When reports that EAS Drafts folder sync on devices was not "working", we realized this was being done and that it appeared to the users as an incomplete functional scenario.  To implement the complete scenario as users expected was not a trivial task and therefore, we chose to close the loophole that allowed it until a true Drafts folder sync could be implemented.

    Going forward we want to deliver true Drafts folder sync functionality because we see this as an important feature now that devices are more capable email editing tools. In order to provide this, schema changes are required in the protocol, meaning only new protocol versions will contain the ability, and subsequently clients will require changes to support the scenario.

    Best regards,
    Tom Jebo
    Supportability PM
    Microsoft Open Specifications

    Wednesday, July 2, 2014 6:10 PM
    Moderator
  • Hi Tom,

    Thanks for providing this information. It is much appreciated.

    For some reason, I feel the need to point out that this line in MS-ASCMD was only added after the February, 2013 version of the document (which is the one that I have locally). As such, it is understandable that clients written before July,2013 (which might or might not have the amended line ;>) would think that syncing the Drafts folder was allowed.

    At any rate, that is awesome that you will be allowing the uploading of messages to the Drafts folder in a future protocol update.

    I would also strongly and emphatically request that you allow the uploading of messages to *any* folder. That will allow clients to file messages into ActiveSync accounts from other accounts. A side affect of that would be that people could use ActiveSync clients to migrate their gmail (and other) accounts onto Exchange Servers and away from those inferior services.

    Thanks!

        -Rich

    Wednesday, July 2, 2014 11:19 PM
  • Rich,

    Thank you again for your valuable comments; I've relayed these to the ActiveSync team.

    Tom

    Thursday, July 3, 2014 12:26 AM
    Moderator
  • MS team: Has there been any update or progress on this?

    Bill

    Thursday, October 9, 2014 4:49 PM
  • Hi Bill,

    thanks for following up on this.  I'm checking with the team now to see if we have any time frame information we can share.

    Stay tuned...

    Best regards,
    Tom Jebo
    Microsoft Open Specifications

    Thursday, October 9, 2014 7:40 PM
    Moderator
  • Hi Bill,

    Again, thanks for asking about the Drafts folder synchronization functionality.  I’ve heard from the product team and although we can’t commit to a time frame before a formal product announcement, we are still considering the functionality for an upcoming release.

    Tom

    Wednesday, October 15, 2014 5:05 PM
    Moderator
  • Tom,

    I'm glad to hear that you are hoping to add this functionality in the future. I don't see that on the Office 365 roadmap at http://roadmap.office.com/en-us . Would it be listed somewhere else or has it not made it to that point yet?

    Thanks,

    Jase

    Friday, March 20, 2015 12:35 PM
  • News releases state Exchange Active Sync version 16 (EAS 16) will support the syncing of the Drafts Folder and that this updated protocol will be part of the new Exchange 2016.

    Further, iOS 9 news releases state that it will support EAS 16.

    Questions:

    1) When will Outlook.com switch over to EAS 16?  So far, using MS Outlook 2013 and Outlook.com, my Drafts Folder does NOT sync.

    2)  If Outlook.com switches over to EAS 16, will MS Outlook 2013 receive an update to allow it to sync the Draft Folder?  Or will I have to update to MS Outlook 2016?

    I really need these questions answered and found this forum to be the most likely place I can get an informed response.  I am not a techie, so hopefully the above make sense.

    Thanks.

    Monday, October 5, 2015 4:18 AM
  • Hi,

    Thank you for this new inquiry. One of our engineers will review this and follow-up soon.

    Thanks,

    Edgar

    Monday, October 5, 2015 4:21 PM
    Moderator
  • Hello Another Outlook User :

    I'm researching this for you and will get back as I make progress.

    Regards


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Monday, October 5, 2015 5:36 PM
  • Hello Another Outlook User

     

    You are correct; source : http://blogs.msdn.com/b/exchangedev/archive/2015/06/08/announcing-exchange-activesync-v16.aspx; that Drafts Sync is supported in EAS v16, but a user will not be able use this feature until a client does the work to support it . Apart from that we don’t have much details to share at this point, please keep checking Office blog : http://blogs.msdn.com/b/exchangedev/ for further announcements.

     

    Regards


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Monday, October 5, 2015 9:12 PM
  • Thank you for your quick reply.

    Just to confirm:

    My email client (MS Outlook 2013 or 2016) or iOS 9 (iPhone) will have to ACTUALLY be updated to support syncing of Drafts.  "News bulletins" aren't enough.

    Final Question:

    As of today, does Outlook.com utilize EAS 16????

    I ask the above question because Outlook 2010 and Outlook.com DO sync Drafts!  Updating to Outlook 2013 broke that!

    Please advise....Thanks

    Tuesday, October 6, 2015 12:16 AM
  • Hello Another Outlook User

     

    Yes, your understanding is correct that email clients have to be updated to get EAS Draft Sync functionality. Regarding outlook.com, you can tell if your mailbox is EAS 16 by running "Exchange ActiveSync" test at https://testconnectivity.microsoft.com; but for this you need a valid 0365 email address and password. Refer this link for more information:   http://blogs.msdn.com/b/exchangedev/archive/2015/06/08/announcing-exchange-activesync-v16.aspx

     

    Please note this forum is for developers developing either client or server endpoint based on the open protocol specification available here: https://msdn.microsoft.com/en-us/library/gg685446.aspx . Since we assume, please excuse us if we are wrong, that you are not implementing either endpoints based on above specifications; we suggest you to kindly post/report any further queries/issues to this forum:  https://social.msdn.microsoft.com/Forums/office/en-US/home?category=exchangeserver

     

    Regards


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team


    Tuesday, October 6, 2015 8:02 PM
  • You are right.  I am not a developer and I am sorry for posting in the wrong place.  It is just that I could not find any information anywhere else.  Further, the links above don't have any information that answers my questions.

    I don't have an Office 365 account to test my mail server bay406-m.hotmail.com.  I doubt it runs Exchange 2016 because iOS supports Exchange 2016 and the Drafts Folder doesn't sync between the two, but if someone could check for me...I would really appreciate it.

    This will be my last post.  Again, it would be nice if some kind soul checks my mail server at the "connectivity test" link above.  It is the mail server that was automatically put into my MS Outlook 2013 program.

    Thanks again and I am sorry again.

    Saturday, October 10, 2015 4:15 AM
  • It would be interesting to know the rationale behind that decision; using IMAP and other mail servers (dovecot is one example) there are no such restrictions.
    Thursday, October 15, 2015 12:41 PM
  • Hello Peter :

    Please refer to the response posted by Tom Jebo (my teammate) on 8/13/2014.

    Regards


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Thursday, October 15, 2015 5:06 PM

  • Hi all,

    I had a couple of questions about the specification for Draft syncing in EAS 16:

    - Does the protocol allow for the uploading of MIME to a drafts folder? If so, is there more to that than setting the airsyncbase:BodyType to 4?

    - Section 2.2.3.7.2  of MSASCMD states, "The Add element cannot be used to add any non-draft email items from the client ...". Can you please clarify the meaning of "non-draft email"? What specific properties make an email a 'non-draft'"?


    Thanks!

        -Rich



    Monday, November 9, 2015 8:42 PM
  • Hi Rich,

    Thanks for the questions about MIME to drafts and non-draft email clarification in the Add element. One of the Open Specifications team will respond shortly to help you with this.

    Best regards,
    Tom Jebo 
    Microsoft Open Specifications

    Monday, November 9, 2015 9:21 PM
    Moderator
  • Hi Rich, I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon. Thank you for your patience.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Monday, November 9, 2015 10:02 PM
    Moderator
  • Hi Rich, I will try to address each of your questions separately.

     

    1. Does the protocol allow for the uploading of MIME to a drafts folder? If so, is there more to that than setting the airsyncbase:BodyType to 4.

     

    I believe the element you are referring to is airsyncbase:Type which is a child of the airsyncBase:Body element. Yes, this is supported. However, there are some additional requirements when sending a draft e-mail to Exchange Server when the type is set to 4 (MIME). The To, CC, BCC, Subject, and ReplyTo elements MUST NOT be present in the request. That information will be extracted from the MIME headers. If any of those are present in the request the client will see a return status value of 6. I have filed a request to have this information added to a future release of the protocol documentation.

     

     

    1. Section 2.2.3.7.2  of MSASCMD states, "The Add element cannot be used to add any non-draft email items from the client ...". Can you please clarify the meaning of "non-draft email"? What specific properties make an email a 'non-draft'"?

     

    The wording in this section is a little odd. I think it's because only a few words changed from the previous version of the document.

     

    Previous Wording:

    The Add element cannot be used to add any email items from the client to the server, or to modify the contents of the recipient information cache.

     

    Current Wording:

    The Add element cannot be used to add any non-draft email items from the client to the server, or to modify the contents of the recipient information cache.

     

    MS-ASEMAIL, section 4.4 contains an example of the client sending a draft e-mail to the server as part of a Sync command request. From this, it appears that the only thing that identifies it as a draft e-mail is that the value of the CollectionId element specifies that the destination is the Drafts folder.

     

    Please let me know if you have any other questions. Thank you.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, November 17, 2015 7:34 PM
    Moderator
  • Hi Josh,

    Thanks!

    This all works as you describe.

    -Rich

    Sunday, November 22, 2015 8:15 PM