Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
executionByFork opened this issue Dec 7, 2022 · 1 comment

Comments

@executionByFork
Copy link

executionByFork commented Dec 7, 2022

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
Copy link
Author

Update: I realized there was a -Verbose flag. It doesn't give much more but it looks like the problem is on bind, during connect, as opposed to after it attempts to gather the GAL.

[*] Using EWS URL https://<URL>/EWS/Exchange.asmx
VERBOSE: Exception calling "Bind" with "2" argument(s): "The request failed. The underlying connection was closed: An unexpected error occurred on a send."
[*] Now attempting to gather the Global Address List. This might take a while...

The aforementioned error immediately follows this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant