I need to make a new Microsoft Outlook Oauth2 API Credential.
I have successfully type-in the client ID and the client secret. I notice that the OAuth Redirect URL pointing at “http://localhost:5678/…” (the default URL for n8n community edition).
I also have configured the Azure App Registrations - Redirect URLs , using my endpoint domain name (Reverse Proxy). In the image below, I change my real domain name with “n8n.mydomainname.com”.
My question is: since you have a domain why use localhost and not setup a tunnel like cloudflare tunnel or a reverse proxy and reference to that your n8n subdomain and not localhost ?
The problem is :
I can’t change the OAuth Redirect URL (https://localhost:5678/…) with the "n8n.mydomainname.id (as shown in the address bar of the browser).
The Microsoft Outlook OAuth2 API always displays an error message, either
a. “localhost refused to connect” if I write the exact OAuth Redirect URL in the n8n MS Outlook Credential above in the Microsoft Azure - Platform Configuration - WEB Redirect URLs
b. “The redirect URL, specified in the request does not match the redirect URLs configured for the application.” if I write my n8n domain name in the n8n MS Outlook Credential above in the Microsoft Azure - Platform Configuration - WEB Redirect URLs.
I have tried to change the “localhost:5678” configuration, using the .env file and the config file, still not solving the problem.