I'm trying to connect to Microsoft Graph API.
I have given the relevant Graph API credentials for authentication.
It doesn't seem to connect and returns the following error:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /---(tenant-id)---/oauth2/v2.0/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000016212518AC0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) 
One thing to note is that this is in a corporate environment. Have set in the proxy to allow  connection to the address but still fails to connect. Any help would be highly appreciated. Thanks.
Make sure you imported request, are you using below code to established a new connection?
import requests
page = requests.get('login.microsoftonline.com') ,
Graph API - Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))