Internal Server Error connecting to O365 Exchange using OAuth

Hello
We have an app registered in Azure which allows our software to "import" emails from mailboxes into our software using OAuth; as well as send outbound emails via our software. Since yesterday, we have noticed that emails are getting duplicated in our system as well as connectivity errors for outbound emails.
We have tried various logging but the only error that is getting returned is "An internal server error occurred. The operation failed" (See Trace below) This is affecting multiple users across multiple sites connecting to their own O365 Exchange. Only affecting OAuth connections, Basic Authentication works fine. No updates to our software have been made.
Any ideas?
<Trace Tag="EwsResponse" Tid="24" Time="2022-08-24 14:19:16Z" Version="15.00.0913.015">
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">*</Action>
</s:Header>
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorInternalServerError</faultcode>
<faultstring xml:lang="en-US">An internal server error occurred. The operation failed.</faultstring>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorInternalServerError</e:ResponseCode>
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">An internal server error occurred. The operation failed.</e:Message>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
</Trace>
We're also seeing this, also for many different customers. The problem appears to be pervasive throughout the service, yet Support has been completely unhelpful so far.
Are you using EWS Api?
I have the same problem, without OAuth and Azure...
In our case, we are using (unmanaged) EWS with OAuth. I will be trying Basic Auth today and will report here if it works.
I can confirm what @Graham Jenkins discovered. The problem only happens for us with EWS + Modern Auth. Switching to Basic Auth with Application Impersonation allows our app to work normally again. Of course, that's a very temporary workaround since it requires degrading tenant security, and it won't work at all in several weeks, when Basic Auth is shut down for good.
It sure would be nice to hear confirmation that Microsoft is aware of this massive problem and is taking steps to remediate it.
Our app logs show this error was (and is) affecting hundreds of users and it started last week.
I am working with EWS Api using username/passwrod + impersonation and It does throw error randomly.
Several customers of our software libraries have reported many occurrences of what appears to be the same issue on August 24th and 25th . In all cases, the error occurs when accessing an O365 mailbox using EWS with app-only OAuth authentication. Eventually, after a while (usually several seconds, but sometimes minutes or even hours), the same EWS request that initially got rejected (with ErrorInternalServerError) succeeds.
We have been able to reproduce this issue by accessing a mailbox using app-only authentication that has not been accessed before (or that has not been accessed for several months). However, our customers reported encountering some mailboxes where the issue persisted for hours. One of the customers reported having used app-only authentication for years without ever encountering this error before August 24th
Based on our observations and other error reports here, we assume this is a server-side issue. However, some clarification from Microsoft would really be appreciated.
Last 48 hours with no errors, don't know if it it because it upgraded my project to .NET 4.8 or if Microsoft did something...
I am facing the same issue. I changes my authentication from Basic to Oauth but this error is coming only on the server.
Hey @Chad Scott , Have you got something regarding this issue? I am facing same issue with EWS + Oauth.
I am able to read mail box while locally debugging the code but error get recording on the server. I don't understand this.
The issue has been fixed for us. It was mostly resolved by early last week, but it took some time for things to propagate to all servers.
@Chad Scott I am still getting this error randomly, Should I create a support request on Microsoft for this ?
Cannot access mailbox for service account: Microsoft.Exchange.WebServices.Data.ServiceResponseException: An internal server error occurred. The operation failed.
After not seeing the issue for a week, I'm seeing it again, though far, far less frequently. Yeah, I'd recommend opening a support ticket and pointing back to this forum post and the others like it.
I have the same issue.
And I discovered
null
prefix in token string in trace of EwsRequest:...wsse:Security soap:mustUnderstand='1'> nulleyJ0eXAiOiJK...
We have fixed this problem:
https://outlook.office365.com/EWS.AccessAsUser.All
service.setUrl(URI.create("https://outlook.office365.com/ews/exchange.asmx"));
service.getHttpHeaders().put("Authorization", "Bearer " + token);
Sign in to comment
Activity