# Problem with Azure \<\> n8n self-host

**URL:** <https://community.n8n.io/t/problem-with-azure-n8n-self-host/98594>\
**Category:** Questions\
**Tags:** microsoft-teams, self-hosted-ai\
**Created:** [April 8, 2025, 4:28pm UTC](https://community.n8n.io/t/problem-with-azure-n8n-self-host/98594 "2025-04-08T16:28:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/santu/32/71577_2.png) [@Santu](https://community.n8n.io/u/Santu)\
**Post date:** [April 8, 2025, 4:28pm UTC](https://community.n8n.io/t/problem-with-azure-n8n-self-host/98594/1 "2025-04-08T16:28:00Z")

</div>

I have the following problem, I am trying to connect my n8n which is hosted on one of my virtual machines inside an enterprise network with Microsoft Azure. After watching a tutorial and creating the app, when I want to make the connection from n8n I get the following error:

Unable to access this website.  
The localhost page has refused the connection.

The URL I enter in Azure is the one provided by n8n:  
[http://localhost:5678/rest/oauth2-credential/callback](http://localhost:5678/rest/oauth2-credential/callback)  
Also, in a tutorial I saw on Youtube, it does not have this problem and manages to authenticate well both things.  
Some considerations: my Azure account is Admin, so the permissions to enable the N8N application are sufficient. If anyone knows or already tried to do it, I would appreciate your help, thank you very much!

---

<div class="post-metadata">

**Author:** ![jcuypers](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jcuypers/32/54965_2.png) [@jcuypers](https://community.n8n.io/u/jcuypers)\
**Post date:** [April 9, 2025, 6:30am UTC](https://community.n8n.io/t/problem-with-azure-n8n-self-host/98594/2 "2025-04-09T06:30:25Z")

</div>

Hi,

There is some additional which could help us, help you.

Can you please share the youtube tutorial you are trying to following?  
Also sharing an actual workflow we be considered a plus.

In most cased with other oauth2 issues is the lack of “allowed origins” or “undefined/insufficient” scopes". I didn’t try on azure but does it have something like a definition on which origins/domains are allowed to make request?

reg,  
J.

---

<div class="post-metadata">

**Author:** ![Santu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/santu/32/71577_2.png) [@Santu](https://community.n8n.io/u/Santu)\
**Post date:** [April 9, 2025, 1:57pm UTC](https://community.n8n.io/t/problem-with-azure-n8n-self-host/98594/3 "2025-04-09T13:57:01Z")

</div>

Hi, the video is:

[![](https://i.ytimg.com/vi/aqr_PwR1Sgc/hqdefault.jpg "Getting Microsoft OAuth Credentials for n8n") ](https://www.youtube.com/watch?v=aqr_PwR1Sgc)

I did exactly the step by step, I get to the tab to authenticate, I give the permissions, I give the Ok to sync but then I get the error that Microsoft can’t access localhost which is understandable.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 8, 2025, 1:57pm UTC](https://community.n8n.io/t/problem-with-azure-n8n-self-host/98594/4 "2025-07-08T13:57:32Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
