Skip to content

"The request is invalid" error if ExchangeVersion is set to V2018_01_08 #441

Description

@bladerunner2020

I am not sure if it is issue of ews-javascript-api or ews itself.
The customer has Exchange2019 and we tried to set exchange version to V2018_01_08.
We got error this:

  Body: {
    __prefix: 's',
    Fault: {
      __prefix: 's',
      faultcode: 'a:ErrorInvalidRequest',
      faultstring: { 'xml:lang': 'ru-RU', faultstring: 'The request is invalid.' },
      detail: {
        ResponseCode: 'ErrorInvalidRequest',
        Message: 'The request is invalid.'
      }
    }
  }

The soap request was:

  <soap:Header>
    <t:RequestServerVersion Version="V2018_01_08"></t:RequestServerVersion>
  </soap:Header>
  <soap:Body>
    <m:FindItem Traversal="Shallow">
      <m:ItemShape>
        <t:BaseShape>IdOnly</t:BaseShape>
        <t:AdditionalProperties>
          <t:FieldURI FieldURI="calendar:AppointmentState"></t:FieldURI>
        </t:AdditionalProperties>
      </m:ItemShape>
      <m:CalendarView MaxEntriesReturned="1000" StartDate="2024-06-16T21:00:00.000Z"
        EndDate="2024-06-26T21:00:00.000Z"></m:CalendarView>
      <m:ParentFolderIds>
        <t:DistinguishedFolderId Id="calendar">
          <t:Mailbox>
            <t:EmailAddress>some-valid@email.com</t:EmailAddress>
          </t:Mailbox>
        </t:DistinguishedFolderId>
      </m:ParentFolderIds>
    </m:FindItem>
  </soap:Body>
</soap:Envelope>

We found out that everything works fine if we set ExchangeVersion to Exchange2016.
I found a discussion on GitHub where there discussed a similar issue: ecederstrand/exchangelib#927

ews-javascript-api - v0.12.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions