Urllib3 connection timeout error


I’m getting the below error when used simple GET request with https://login.microsoftonline.com only when I’m connected to the office network


urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘login.microsoftonline.com’, port=443): Max retries exceeded with /7831e6d9-dc6c-4cd1-9ec6-1dc2b4133195/v2.0/.well-known/openid-configuration (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000020770E376D0>, ‘Connection to loginmicrosoftonlinecom timed out. (connect timeout=None)’))

I tried to check for the proxy but looks like it is using some script for proxy.
How can I make it work?