Microsoft Outlook OAuth2 Pop out timesout when signing in

Describe the problem/error/question

I’ve set up the n8n running on my server behind a NGINX reverse proxy. I’ve followed all the instructions I can see, set up the Webhook URL, checked through my OAuth Redirect URL, and that it matches on Azure. I’ve gone through and checked that from my server I can access the Microsoft OAuth and it all seems to connect.

The problem is that when I try to ‘Connect my account’ by clicking on the red button it opens the pop up to sign into my Microsoft Account and when i click to sign in it just timesout after 30 seconds. Get the following error:

No other logs from docker apart from saying it timesout.

What is the error message (if any)?

Error: connect ETIMEDOUT 20.190.159.128:443

More detailsFailed to connect. The window can be closed now.

Docker log:
25-02-20T17:31:16.655Z | debug | Credential updated {“credentialId”:“05b4rUltkgbI5Xdu”,“file”:“credentials.controller.js”,“function”:“updateCredentials”}

2025-02-20T17:31:16.656Z [Rudder] debug: no existing flush timer, creating new one

2025-02-20T17:31:16.753Z | debug | OAuth2 authorization url created for credential {“userId”:“1ac74984-fad5-441d-b04e-b04315af6ebd”,“credentialId”:“05b4rUltkgbI5Xdu”,“file”:“oauth2-credential.controller.js”,“function”:“getAuthUri”}

2025-02-20T17:31:26.656Z [Rudder] debug: in flush

2025-02-20T17:31:26.656Z [Rudder] debug: cancelling existing flushTimer…

2025-02-20T17:32:10.466Z | debug | Querying database for waiting executions {“scopes”:[“waiting-executions”],“file”:“wait-tracker.js”,“function”:“getWaitingExecutions”}

2025-02-20T17:33:10.496Z | debug | Querying database for waiting executions {“scopes”:[“waiting-executions”],“file”:“wait-tracker.js”,“function”:“getWaitingExecutions”}

2025-02-20T17:33:43.109Z [Rudder] error: Response error code: ETIMEDOUT

Information on your n8n setup

  • n8n version: 1.79.2
  • Database (default: SQLite): default: SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux Ubuntu

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @bmswest

Did you check that your webhook is accessible from the internet?

You can set a test webhook trigger node and check if it’s accessible by simply opening the webhook url in the browser

I’ve just tested that and it seems to work. for that web hook.

I’ve also moved across to Caddy Server to see if that would resolve it with no such. I even tested by trying it without the reverse proxy and using localhost:5678 and that didn’t seem to work.

I can ping the Microsoft login from my server and it can reach it. It’s just the response for the OAuth after trying to sign in with my credentials that seems to get no response. I’ve double checked the setup on Microsoft Azure and it all looks to be set up correctly.

How your OAuth callback url looks? It should be set as https://some_domain/

This is my docker compose:

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - "5678:5678" # Bind to localhost to prevent direct external access
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=*********
      - N8N_BASIC_AUTH_PASSWORD=*********
      - N8N_HOST=n8n.vindo.live 
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://n8n.vindo.live/ 

    volumes:
      - n8n_data:/home/node/.n8n

And my Caddyfile

# n8n Server
n8n.vindo.live {
        reverse_proxy localhost:5678 {
          flush_interval -1
        }
}

That one should be set to http, as you are not using any SSL for n8n.

I do not see an SSL configuration for Caddy

Caddy automatically generates the SSL, so have been logging in over a HTTPS connection which has meant it is secure. When I moved to test it without the reverse proxy a tested it on http and that didn’t work either. Any other suggestions? It seems it’s an issue with the OAuth2 flow, but not sure how to resolve that from the settings I’ve set up.