David-Barrett-MS / PowerShell-EWS-Scripts

A collection of PowerShell scripts that use EWS to perform actions against Exchange mailboxes
MIT License
118 stars 13 forks source link

Works for some but not all mailboxes... perhaps a folder config issue? #33

Closed DFryatt closed 1 year ago

DFryatt commented 1 year ago

David, First of all, thank you for all of your work on these scripts over the years - they are truly valuable to us admins.

I have been converting my scripts to use your updated versions to work with Oauth but I've found an issue where some of the mailboxes in my tenant cannot be 'found' although, I'm certain they exist.

For the affected mailboxes that I've found so far, it throws two different errors (likely the related or the same) for each script.

With the merge script, I'll get: Error (ThrottledFolderBind): Exception calling "Bind" with "3" argument(s): "The specified object was not found in the store., Default folder Root not found." Failed to open target message store (***redacted***)

With other dedupe script, I'll get: Error (ThrottledFolderBind): Exception calling "Bind" with "3" argument(s): "The specified object was not found in the store., Default folder Root not found." Failed to find folder WellKnownFolderName.MsgFolderRoot

Like I said, this doesn't happen for all mailboxes so I'm curious if you are aware of this issue and/or if you have any workarounds that I can try.

Many thanks!

BWaddle commented 1 year ago

Was this ever resolved? I have the same issue.

David-Barrett-MS commented 1 year ago

The error means what it says - for some reason EWS was not able to find the root folder of the target mailbox. This is usually due to lack of permissions.