MailSniper icon indicating copy to clipboard operation
MailSniper copied to clipboard

The underlying connection was closed: An unexpected error occurred on a send.

Open executionByFork opened this issue 1 year ago • 1 comments

I seem to keep getting this error when attempting to download the GAL

Get-GlobalAddressList : Exception calling "ResolveName" with "1" argument(s): "The request failed. The underlying connection was closed: An unexpected error occurred on a send."
At line:1 char:1
+ Get-GlobalAddressList -OutFile gal.txt -ExchHostname ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-GlobalAddressList], MethodInvocationException
    + FullyQualifiedErrorId : ServiceRequestException,Get-GlobalAddressList

I am supplying ExchHostname, UserName, and Password values. I have also tried several different ExchangeVersion values without success.

I have also found this article https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online As of Oct 1, 2022, Microsoft has deprecated basic authentication for EWS. I assume this is related and the cause of this error? Not positive though. If this is an error from basic auth's deprecation, it might be nice to catch this and print an explanation to console.

executionByFork avatar Dec 07 '22 21:12 executionByFork