Skip to content

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

@executionByFork

Description

@executionByFork

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.

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