none
Internal server error thrown by EnableAlwaysCategorizeItemsInConversations() EWS Managed API RRS feed

  • Question

  • One of our clients who is using our product has started experiencing a strange "Internal Server Error" thrown by ExchangeService.EnableAlwaysCategorizeItemsInConversations() which worked for him before.

    Unfortunately it wasn't a transient error and I had to disable the autocategorization feature in our product to allow him using other features.

    The things got worse today. Now  me and my colleague both using our corporate O365 accounts are affected by "Internal Server Error" Exchange error identical to the original one.

    Here is a sample code which throws a ServiceResponseException. It worked for me at least a week ago and earlier. I was using it to ensure the autocategorization works on different Exchange versions.

    Any help or troubleshooting advises are very welcome!

    Thanks,

    Anton

    var propertySet = new PropertySet(
        BasePropertySet.IdOnly, 
        ItemSchema.ConversationId);
    
    var emails = service.FindItems(
        WellKnownFolderName.Inbox, 
        new ItemView(100)
        {
            PropertySet = propertySet
        });
    
    var ids = emails.Select(i => i.ConversationId)
                    .Distinct()
                    .Take(10)
                    .ToList();
    
    var categories = new[] {"My category"};
    var response = service.EnableAlwaysCategorizeItemsInConversations(
        ids, 
        categories, 
        true);
    
    

    SOAP dump:

    <Trace Tag="EwsRequest" Tid="1" Time="2018-03-16 16:21:18Z" Version="2.2.1.0">
      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Header>
          <t:RequestServerVersion Version="Exchange2010_SP2" />
        </soap:Header>
        <soap:Body>
          <m:ApplyConversationAction>
            <m:ConversationActions>
              <t:ConversationAction>
                <t:Action>AlwaysCategorize</t:Action>
                <t:ConversationId Id="AAQkADFhNDJkOTk2LTU3MTYtNDNjMy1hZjVhLTU3M2IxMTA2OGUyZQAQAODJjY5DlmRIo5w1T2MflWo=" />
                <t:ProcessRightAway>true</t:ProcessRightAway>
                <t:Categories>
                  <t:String>My category</t:String>
                </t:Categories>
              </t:ConversationAction>
              <t:ConversationAction>
                <t:Action>AlwaysCategorize</t:Action>
                <t:ConversationId Id="AAQkADFhNDJkOTk2LTU3MTYtNDNjMy1hZjVhLTU3M2IxMTA2OGUyZQAQAE0qCKichkF3mhPCawvnXr8=" />
                <t:ProcessRightAway>true</t:ProcessRightAway>
                <t:Categories>
                  <t:String>My category</t:String>
                </t:Categories>
              </t:ConversationAction>
              <t:ConversationAction>
                <t:Action>AlwaysCategorize</t:Action>
                <t:ConversationId Id="AAQkADFhNDJkOTk2LTU3MTYtNDNjMy1hZjVhLTU3M2IxMTA2OGUyZQAQAOsYDSJdC0HXhPtI5X11vZc=" />
                <t:ProcessRightAway>true</t:ProcessRightAway>
                <t:Categories>
                  <t:String>My category</t:String>
                </t:Categories>
              </t:ConversationAction>
            </m:ConversationActions>
          </m:ApplyConversationAction>
        </soap:Body>
      </soap:Envelope>
    </Trace>
    <Trace Tag="EwsResponseHttpHeaders" Tid="1" Time="2018-03-16 16:21:19Z">
    HTTP/1.1 500 Internal Server Error
    request-id: 5f1c8b40-bffe-41f1-ae52-c0e71ef9cdb0
    X-CalculatedFETarget: DB6P190CU001.internal.outlook.com
    X-BackEndHttpStatus: 500,500
    X-FEProxyInfo: DB6P190CA0020.EURP190.PROD.OUTLOOK.COM
    X-CalculatedBETarget: DB5PR08MB0695.eurprd08.prod.outlook.com
    X-DiagInfo: DB5PR08MB0695
    X-BEServer: DB5PR08MB0695
    X-FEServer: DB6P190CA0020,VI1PR0102CA0006
    Content-Length: 783
    Cache-Control: private
    Content-Type: text/xml; charset=utf-8
    Date: Fri, 16 Mar 2018 16:21:18 GMT
    Set-Cookie: exchangecookie=6f24cf0fc0ba4f68ad6a094fd45f647c; path=/
    Server: Microsoft-IIS/10.0
    X-AspNet-Version: 4.0.30319
    X-Powered-By: ASP.NET
    
    
    </Trace>
    <Trace Tag="EwsResponse" Tid="1" Time="2018-03-16 16:21:19Z" Version="2.2.1.0">
      <?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>
    
    Friday, March 16, 2018 4:30 PM