How to get attachments data from EWS Managed API 2.2 with authentication token RRS feed

  • Question

  • i am trying to get attachment data by using EWS Managed API 2.2. i use attachment id and authentication token which obtained from Office.context.mailbox.getCallbackTokenAsync() method in office javascript api 1.1.i use following code with asp.net web api project
    An error occur when calling service.GetAttachments(). here is code and exception detail 

    	    ExchangeService service = new ExchangeService();
                service.Credentials = new OAuthCredentials(rawToken);
                service.Url = new Uri(EwsUrl);
                var attachmentIds = new List<string>();
                var getAttachmentsResponse =
                                         new PropertySet(BasePropertySet.FirstClassProperties,
                if (getAttachmentsResponse.OverallResult == ServiceResult.Success)

    Exception details

    Method not found: 'Microsoft.Exchange.WebServices.Data.ServiceResponseCollection`1<Microsoft.Exchange.WebServices.Data.GetAttachmentResponse> Microsoft.Exchange.WebServices.Data.ExchangeService.GetAttachments(System.String[], System.Nullable`1<Microsoft.Exchange.WebServices.Data.BodyType>, System.Collections.Generic.IEnumerable`1<Microsoft.Exchange.WebServices.Data.PropertyDefinitionBase>)'.

    Wednesday, December 24, 2014 7:18 AM

All replies

  • Hello,

    I'd recommend asking EWS related questions on the Exchange Server Development forum instead.

    Wednesday, December 24, 2014 7:40 AM
  • It might be that you're including MimeContent in the property set. Try leaving that out. If that doesn't do it, you may want to enable tracing and see the request and response.
    Monday, December 29, 2014 4:14 PM
  • Have you resolved this issue?   I'm having the same problem.

    Germán Hayles

    Monday, January 14, 2019 7:41 PM