I'm trying to help a client install the AAD Connect Health Agent on their ADFS servers and we got a timeout error when it is trying connect to endpoint https://login.microsoftonline.com Our initial approach was to run Register-AzureADConnectHealthADFSAgent and then enter the creds for the GA account, this did not work. After much troubleshooting, we tried
$cred = Get-Credential
Register-AzureADConnectHealthADFSAgent -Credential $cred and it did work, which makes no sense and seem like a bug that would have been reported by others.
Any idea why this would happened?