In Microsoft Exchange Server 2019 or Exchange Server 2016, assume that you set a web proxy server that the Exchange Server uses to reach the Internet by using the InternetWebProxy parameter and there's no direct access to the Internet. You may experience that the OAuth connectivity always fails if you test it by using the Test-OAuthConnectivity cmdlet even if the connectivity is working fine.
This issue occurs because the Test-OAuthConnectivity cmdlet does not honor the InternetWebProxy settings set on the Exchange Server. Therefore, if the Exchange Server is blocked to connect to the Internet directly, you won't correctly test the OAuth connectivity.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Learn about the terminology that Microsoft uses to describe software updates.