This add-in is working in desktop and web outlook but is failing inconsistently in mobile devices using native outlook app.
In mobile device: it is working randomly for some accounts whereas the same code is not working for other accounts irrespective of the device.
We have verified for outlook versions, devices, account permissions level and do not see any issues.
While debugging we suspected that the problem might be processing documents from EWS server. In mobile outlook app the attachment token and ID values are different from desktop/web client for the same code.
Code links –
https://docs.microsoft.com/en-us/outlook/add-ins/get-attachments-of-an-outlook-item
We are receiving the error in below snippet of code that is referenced from the above mentioned links.
ExchangeService service = new ExchangeService();
service.Credentials = new OAuthCredentials(request.attachmentToken);
service.Url = new Uri(request.ewsUrl);
var getAttachmentsResponse = exchangeService.GetAttachments(attachmentIds.ToArray(),
null,
new PropertySet(BasePropertySet.FirstClassProperties,
ItemSchema.MimeContent));
getAttachmentsResponse.OverallResult returning ERROR in mobile for particular users
Need help to resolve this issue