Hi,
Thanks for posting here.
Network Connectivity Status Indicator (NCSI) is designed to be responsive to network conditions, so it examines the connectivity of a network in a variety of ways. One test failed, NCSI may report a error, even if the networking actually can be accessed fully.
Sometimes, we can access the http://www.msftncsi.com/ncsi.txt file in IE, but the NCSI still fails. It is because the NCSI traffic is not sent via IE but via WinHTTP component and use proxy specially. A proxy server which requires user authentication won't allow it access Internet. Basically, NCSI must perform extra steps in an environment that has proxy servers. Web Proxy Automatic Discovery (WPAD) proxy detection is recommended. If WPAD is not used, configure WinHTTP proxy settings to help NCSI:
netsh winhttp set proxy command
For how to disable NCSI, please kindly refer to the workaround in the following article:
https://support.microsoft.com/en-us/help/4494446/an-internet-explorer-or-edge-window-opens-when-your-computer-connects
Meanwhile, I found another article related to Microsoft Connection Test (NCSI) and office 365 for your reference.
https://purepcs.co.uk/kb/microsoft-connection-test-ncsi-and-office-365/
Please Note: Since the websites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.
Hope my answer will help you.
---Please Accept as answer if the reply is helpful---
Best Regards,
Sunny