'Unable to initialize MSAL within organization linux sever due to socket timeout

I have register an Azure App with delegated permission. I also have local anaconda instance install on my desktop. Now when I initialize MSAL using below code, using python instance on my desktop it works well but when I try to copy and run the same code with python instance on my company linux server it does not work. Also it does not throw any exception i.e it keeps on running for indefinite time. While debugging I found that socket is unable to make connection. Need your help to understand what is wrong here and how can I run the same code on company linux server.

import msal
app = msal.ConfidentialClientApplication(config['client_id'], authority=config['authority'],client_credential=config['secret'], proxies={"http":"http://user:[email protected]"})
socket.connect(host,port)

To Note: I have got login.microsoftonline.com whitelisted.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source