Exchange 2019 CU8 - EWS - FirstClassProperties

Mario Fuchs 1 Reputation point
2021-01-21T11:07:48.3+00:00

Hi,

im trying to get exchange email items via EWS. Accessing One Mailbox with "FirstClassProperties" returns "No mailbox with such guid".

If we use a custom property set it just works fine. Any ideas?

THIS ONE - ERROR "No mailbox with such GUID"

$PropSet = New-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties)

$PSItem.Load($PropSet)

THIS ONE WORKS

$PropSet = New-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::IdOnly, [Microsoft.Exchange.WebServices.Data.ItemSchema]::Subject,
[Microsoft.Exchange.WebServices.Data.ItemSchema]::Body,
[Microsoft.Exchange.WebServices.Data.ItemSchema]::Attachments,
[Microsoft.Exchange.WebServices.Data.ItemSchema]::DateTimeSent,
[Microsoft.Exchange.WebServices.Data.EmailMessageSchema]::Sender
)

$PSItem.Load($PropSet)

Maybe anyone has an hint. On another mailbox both are working correctly. (Already recreated the mailbox)

Regards,

Mario

Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
508 questions
0 comments No comments
{count} votes