Last year a new feature was introduced into Exchange Online to allow you to create an Attachment where the Attachment resided on OneDrive rather then the traditional Email attachment approach you can read more about this here http://blogs.office.com/2014/10/08/introducing-new-way-share-files-outlook-web-app/ there was also an Ignite session you can watch on how this has evolved https://channel9.msdn.com/Events/Ignite/2015/BRK2196. MAPI has always had a rich set of attachment types since Exchange's inception to deal with Rich Text Messaging eg the various attachment types you can encounter are listed in https://msdn.microsoft.com/en-us/library/office/cc815439.aspx . In EWS these attachment types where simplified some what into either Item Attachments (for Attached Store Items) or File Attachments. To cater for this new feature a new Attachment Type called a
ReferenceAttachment has been introduced into EWS in Exchange Online. To see the
ReferenceAttachmentType you need to have your requested Server version set to Exchange2003_SP1 else the attachment will just be returned as a FileAttachment . Essential this is what you will see in a EWS Response when you have a reference attachment
If your using Proxy code and you've updated your WSDL proxies you should be able to use the ReferenceAttachmentType to access the AttachLongPathName property etc. If your using the EWS Managed API there currently is no support for Reference Attachments in the last released version or the Open Source Repo https://github.com/OfficeDev/ews-managed-api . So I've forked the open source repo and added support in for this (note its read only support) into my GitHub repo https://github.com/gscales/ews-managed-api . For those that just want the binaries https://github.com/gscales/EWS-Binaries/blob/master/RAFork-Microsoft.Exchange.WebServices.zip Note this is patched build not a stable build so use it at your own risk.
To use this in code with the CSOM to download the Attachment from One drive looks like
Or in a Script that will download the last email in the Mailbox and download any reference attachments from that message I've put a download of this script here