OfficeDev / ews-managed-api

Other
585 stars 322 forks source link

While enumerating Public Folders: Unable to cast object of type 'Microsoft.Exchange.Data.Storage.PublicFolderSession' to type 'Microsoft.Exchange.Data.Storage.IMailboxSession'. #263

Open vlw007 opened 3 years ago

vlw007 commented 3 years ago

We have a few dozen tenants that have started to see this error popup when enumerating public folders:

An internal server error occurred. The operation failed., Unable to cast object of type 'Microsoft.Exchange.Data.Storage.PublicFolderSession' to type 'Microsoft.Exchange.Data.Storage.IMailboxSession'.

It's just a few now but its growing in the US and Europe. This started March 18 about 9:00am PST or earlier.

The problem occurs when the items in a PF are enumerated. It's still possible to enumerate the PF hierarchy.

At least one customer with this error can successfully view the contents of the same public folder using Outlook Desktop.

We have another 1000 tenants that do not experience this problem but I fear it is spreading.

Has anyone else seen this issue?

Curtis-Schmidt commented 3 years ago

We're a GCC tenant and we encountered it early this morning (3/23/2021) when trying to get appointments from our public folder calendars.

CodeMan1000 commented 3 years ago

Yes, vlw007. We are using EWS to connect to a public contacts folder in Office 365, and we have been getting this error on one tenant since this morning (3/23/2021 8 a.m. ET)

vlw007 commented 3 years ago

Thank you @schmicwork and @CodeMan1000 -- we are starting to see this problem clear for a few tenants. Hopefully you will see this resolution as well.

mirecad commented 3 years ago

Same problem appeared for us at 8:45 PM UTC 3/23/2021 when accessing PF items with EWS.

T33d33 commented 3 years ago

We are experiencing same problem since 24.03.2021 08:00 CET.

zumbuschms commented 3 years ago

The issue might not be related to EWS Managed API library. We have reports from customers with the same issue and we do not use EWS Managed API to access EWS in Microsoft 365. The error message is reported by Exchange Online in the SOAP response.

vlw007 commented 3 years ago

Now we are seeing this problem with tenants in Australia and New Zealand.

dbranker commented 3 years ago

Dealing with this issue as well. If anyone finds a solution or temp fix, that would help out a ton.

giladgrosman commented 3 years ago

Same issue here, started at 24.03.2021

JeffJewson commented 3 years ago

Same issue here started 24.03.2021. Contacted our CSP who opened a ticket with Microsoft referencing this page. About 10:15AM CST today it started working again (15 minutes ago)

LukePWilkins commented 3 years ago

Experiencing this issue for the last few days, while performing a PF migration using BitTitan.

Curdie commented 3 years ago

I'm experiencing the same issue using EWS to search contacts in a public folder (Microsoft 365).

Microsoft.Exchange.WebServices.Data.ServiceResponseException: 'An internal server error occurred. The operation failed., Unable to cast object of type 'Microsoft.Exchange.Data.Storage.PublicFolderSession' to type 'Microsoft.Exchange.Data.Storage.IMailboxSession'.'

JeffJewson commented 3 years ago

As I stated before this started working for us again about 10:15AM today.

I did open a case with Microsoft prior to that this morning.

• Case #: 24895256 • Created on: Thursday, March 25, 2021 11:15 AM • Title: EWS API Public Folder Session • Description: I’ve developed an application the pulls events from a public calendar utilizing Exchange Web Services (EWS) API. It is coded in C# .NET 4.6. It’s been in production for 4 years with no issues. I ran it in debug mode to locate where it’s breaking: 1. I’m able to connect to EWS using the same credentials. So it’s not a basic authentication issue. 2. I’m able to enumerate all public folders and locate the calendar I’m looking for. 3. But when trying to pull events from that calendar I’m receiving this error: Unable to cast object of type 'Microsoft.Exchange.Data.Storage.PublicFolderSession' to type 'Microsoft.Exchange.Data.Storage.IMailboxSession'. This started Wednesday morning 3/24 I’ve since located this thread which reports it happening globally….. https://github.com/OfficeDev/ews-managed-api/issues/263 Please request that Microsoft fix this issue as our business process relies on this functionality.

Maybe you can reference that case number and they can fix your instance as well.

T33d33 commented 3 years ago

We are experiencing same problem since 24.03.2021 08:00 CET.

It's working again 26.03.20201 8:00 CET

Curtis-Schmidt commented 3 years ago

We're a GCC tenant and we encountered it early this morning (3/23/2021) when trying to get appointments from our public folder calendars.

Ours are back online as of this morning.

dbranker commented 3 years ago

our is back online as well.

CodeMan1000 commented 3 years ago

This problem stopped happening for us around midnight ET 3/26.