Trying to setup the email configuration for Exchange Online. When I test the connection I get the following error.
Test connection failed with the following message: Length cannot be less than zero. Parameter name: length
I login to Exchange Online via PowerShell from my workstation. So I know the user account on the 365 side is fine. But it won't connect via AirWatch.
This happened to us a few weeks ago. For us, it was because the connectors updated and ExchangeOnlineManagement module was updated to an unsupported version as part of the update
On your connector system run a Get-InstalledModule command (Ours had been updated to 3.1.0)
If you are currently above 2.0.5 it may be the cause of the failure
Uninstall PowerShell Module for Specific Version
Uninstall-Module -Name ExchangeOnlineManagement -RequiredVersion 3.1.0
Install OLD PowerShell Module with Specific Version
Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5
As soon as we changed the installed version, our powershell was able to connect to exchange. These instructions came from our SR with VMware
Thank you. We had the same issue and your steps helped.
One additional thing to call out. Had to reboot the ACC to perform the module uninstall as we kept getting module in use message.
Note: if you have "Exchange Powershell" option disabled in Airwatch Cloud Connector config, the PS commands go through SaaS environment and have no dependency on ACC.
Also, if the issue persists, check the Azure AD signin logs for the account [non interactive signin's]