EWS Managed API started giving 401 unauthorized error

I have developed  office 365 outlook mail application which parses selected email message data (i.e. recipients details, subject, email body & attachments) using EWS API calls and saving these parsed information into our custom database. It is being working fine without any problems but EWS API calls started giving "401 unauthorized" exception since yesterday. I am able to login to my outlook web without any problems and i can access my mail app but i am frequently getting "401 unauthorized" exception when i try to parse email message details since yesterday.

Can anyone let me what could be the problem here?

I am using the below code snippet to parse email message information.

****************************************************************

ExchangeService service = new ExchangeService();
service.Credentials = new OAuthCredentials(CallBackAuthenticationToken);
service.Url = new Uri(request.EwsUrl);
service.CookieContainer = new CookieContainer();

PropertySet propSet = new PropertySet(BasePropertySet.IdOnly, ItemSchema.Subject);
Item item = Item.Bind(service, request.MessageId);

****************************************************************

Thanks & Regards,

Niranjan Rao Ch

July 11th, 2015 1:55am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics