Forum Discussion
chad-at-danaher
Jul 12, 2023Copper Contributor
Error connecting to ExchangeOnline with PowerShell 7 - "Error Acquiring Token:...."
I can connect to EXO with PowerShell 5.1 fine. I just installed PS 7.3.5. When I run Connect-ExchangeOnline I get the following error: PS C:\> Connect-ExchangeOnline Error Acquiring Token: Syst...
kevkelly
Jul 12, 2023MCT
What version of the Exchange Online Management module do you have installed? You can check the version by running the following:
Import-Module ExchangeOnlineManagement
Get-Module ExchangeOnlineManagement- chad-at-danaherJul 13, 2023Copper Contributor
kevkelly the module version is 3.2.0
- kevkellyJul 14, 2023MCT
PowerShell 7.3.5 should be supported in version 3.2.0 of the ExchangeOnlineManagement module as stated in the Exchange Online PowerShell module
Check the security protocol that is in use:
[Net.ServicePointManager]::SecurityProtocolAnd as Alexterneuzen stated, use the following to set to Tls1.2:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - AlexterneuzenJul 13, 2023Copper ContributorMake sure that tls1.2 is enabled
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12