Error retrieving OAuth Token: HTTPSConnectionPool(host='login.microsoftonline.com', port=443):
Max retries exceeded with url: /common/oauth2/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f46150410f0>:
Failed to establish a new connection: [Errno -2] Name or service not known',))
request_handler.pyLine 41: def _get_oauth_token(self, code)
In request_handler.pyFrom:class Office365RequestHandler():…
def _get_oauth_token(self, code):
…
body = {
‘grant_type’: ‘authorization_code’,
‘resource’: ‘https://outlook.office365.com/’,
‘redirect_uri’: redirect_uri,
‘client_id’: client_id,
‘code’: code
‘client_secret’: client_secret
}
try:
r = request.post(
request_url + ‘/token’,
data=body
)To:class Office365RequestHandler():…
def _get_oauth_token(self, code):
…
body = {
‘grant_type’: ‘authorization_code’,
‘resource’: ‘https://outlook.office365.com/’,
‘redirect_uri’: redirect_uri,
‘client_id’: client_id,
‘code’: code
‘client_secret’: client_secret
}
try:
r = request.post(
request_url + ‘/token’,
data=body,
proxies = {‘http’:’http://<proxy>’,’https’:’https://<proxy>’}
)
class Office365RequestHandler():…
def _get_oauth_token(self, code):
…
body = {
‘grant_type’: ‘authorization_code’,
‘resource’: ‘https://outlook.office365.com/’,
‘redirect_uri’: redirect_uri,
‘client_id’: client_id,
‘code’: code
‘client_secret’: client_secret
}
try:
r = request.post(
request_url + ‘/token’,
data=body
)
class Office365RequestHandler():…
def _get_oauth_token(self, code):
…
body = {
‘grant_type’: ‘authorization_code’,
‘resource’: ‘https://outlook.office365.com/’,
‘redirect_uri’: redirect_uri,
‘client_id’: client_id,
‘code’: code
‘client_secret’: client_secret
}
try:
r = request.post(
request_url + ‘/token’,
data=body,
proxies = {‘http’:’http://<proxy>’,’https’:’https://<proxy>’}
)
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
29-Sep-2026
|
Initial Release |