Unable to connect to login.microsoftonline.com:443 for teams Oauth2

I have been trying to create Oauth credentials for Microsoft Teams integration. I have created the App and entered the client ID and Secret into the API section on n8n. However, when i try to connect i login to Microsoft and it then returns this below:


{“code”:0,“message”:“Unable to connect to login.microsoftonline.com:443”,“hint”:"",“stack”:“ConnectionError: Unable to connect to login.microsoftonline.com:443\n at TLSSocket.onError (/usr/lib/node_modules/n8n/node_modules/popsicle-transport-http/dist/index.js:589:35)\n at Object.onceWrapper (events.js:422:26)\n at TLSSocket.emit (events.js:315:20)\n at TLSSocket.EventEmitter.emit (domain.js:485:12)\n at emitErrorNT (internal/streams/destroy.js:100:8)\n at emitErrorCloseNT (internal/streams/destroy.js:68:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)”}

I have n8n updated to the latest version running on npm.


At first glance it looks like it could be a network issue, how do you have n8n installed?

Its installed using npm behind a proxy, nginix setup with a self signed certificate that has a proxy pass rule to allow https traffic to the n8n service.

Is there an outbound proxy as well or just the reverse for incoming traffic?

There’s both, however n8n is configured on the proxy to have internet access.

It might be worth checking the log on the outbound proxy to see if the connection is getting that far, If I had to guess I would say the proxy is blocking it or trying to be clever with it.

Have you tried accessing the container and seeing if curl is installed and if that can connect?