Based on your description, I understand that Connect-ExchangeOnline intermittently hangs at “Connecting” or disconnects after a few minutes even though the network is stable and you’re using the latest ExchangeOnlineManagement (EXO V3) module. You want the recommended way to isolate whether the issue is client setup, module/version behavior, or tenant-side policies/service health.
In this situation, I recommend you can follow the some approaches below to see if it can resolve your problem:
Baseline the client and EXO module
Confirm prerequisites and load path; EXO V3 requires PowerShellGet + PackageManagement for REST connections. Update the module and dependencies, and avoid multiple EXO versions installed side-by-side.
Get-InstalledModule ExchangeOnlineManagement
Get-Module ExchangeOnlineManagement -ListAvailable
Get-InstalledModule PowerShellGet, PackageManagement
Validate authentication flow and test with and without WAM
Start with the default (WAM-enabled) flow:
Connect-ExchangeOnline -UserPrincipalName <UPN> -ShowBanner:$false
If it still hangs, run a temporary diagnostic using -DisableWAM (do not keep long-term), this helps isolate WAM/broker/profile context issues.
Connect-ExchangeOnline -UserPrincipalName <UPN> -DisableWAM -ShowBanner:$false
Refresh Module + Token Cache (Clean Client Environment)
Failures often occur due to mixed module versions, outdated dependencies, or stale authentication tokens.
Run:
Uninstall-Module ExchangeOnlineManagement -AllVersions
Install-Module ExchangeOnlineManagement
Update-Module PowerShellGet
Update-Module PackageManagement
Remove-Item "$env:LOCALAPPDATA\Microsoft\PowerShell\TokenCache\*" -Recurse -Force
Hope my answer will help you, for any further concern, kindly let me know in the comment section.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.