Integrating Personal Hotmail Account with OAuth2 in n8n

Hi everyone,

I’m new to using n8n and am trying to integrate my personal Hotmail account for automation workflows. I’ve noticed that n8n supports OAuth2, but I’ve run into some challenges with setting this up for a personal Microsoft account.

From my research, it seems like setting up OAuth2 requires registering an app in Azure Active Directory. However, as this is a personal account (not part of a business or enterprise setup), I don’t think I have the ability to register apps in Azure or delegate access in the way that’s needed.

I’ve considered using IMAP/SMTP as an alternative, but I’d prefer to use OAuth2 so that I can also use “To Do”, and “OneDrive”.

Has anyone successfully set up OAuth2 for a personal Microsoft account in n8n?

Any advice or suggestions would be greatly appreciated!

Thanks in advance!

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:

Hey @tomwhi,

Welcome to the community :raised_hands:

You have pretty much nailed it, You will need to create an Azure account which doesn’t need to be a business account and register your own app there for oauth.

Hiya @Jon - thanks for your response.

I’m not that Azure / personal accounts works in that way, or if it is, then I’m confused :slight_smile:

To get my wording correct from my initial post… I’m trying to access outlook.com resources and not Office 365 resources.

Office 365 resources would 100% require an App Registration / Enterprise App as that would all be trusted by the tenant/directory and you can delagate email/calendar etc. access which I’m pretty confident with.

However accessing Outlook.com resources can’t be achieved with an Azure account - I’ve been through the screens and don’t see any option to allow that. I’ve looked at other blog posts too and I can’t see anyone else doing it that way.

For context, I already have an Azure tenant which my personal account (@hotmail.com) has access to, but that only gives my personal account access to that tenant and doesn’t allow me to delagate access to email/tasks/calendar within my @hotmail.com account. I can give my @hotmail.com user rights within the tenant but that doesn’t allow me to access my emails etc.

I think accessing outlook.com resources would require a seperate integration - unless someone else in the community can explain to me what I’m doing wrong!

Thanks again for reaching out to me.

1 Like

Hi -

I’m still looking for support to integrate Outlook.com (personal, not Azure/Office365) email and calendar into n8n.

Cheers
Tom

1 Like

Did you get any further with this?

I am trying to do the same.

1 Like

As previously mentioned you can create an app registration with a normal Microsoft account in Azure that can be used for non tenant Microsoft accounts to access.

For supported account types you can select Accounts in any organizational directory and personal Microsoft accounts which allow any Microsoft account including Hotmail accounts to authenticate.

For more information you can see the table here: Register an application with the Microsoft identity platform - Microsoft Graph | Microsoft Learn

Once you have set this up you add the client id and secret to n8n, authenticate from the n8n side and you will be able to access your emails and send new ones.

Hi Stoked

I did get this working but it was bizzare, I didn’t realise that you could do what Jon had said so I was going around in circles trying to work it out.

I will do a proper write up at some point and update this post in case anyone else needs the support.

If you don’t already have an Azure account then you’ll need to set one up, they are free. This will give you a tenant (directory in old AD language).

I then went and created an app registration, I called it “n8n”. You’ll need the Client ID for the n8n creds screen.

Under Certs and Secrets I created a secret with 180 day lifetime (you can set a custom one if you don’t want to let it run out). You’ll need the value of the scret (not the secret ID) which is in another column.

You’ll then need to fill in the Redirect. This can be found on the n8n cred too when you’re setting it up, you’ll have one for your domain.

When I create an n8n cred for a microsoft account (Outlook, OneDrive or To-do) I can use the same Client ID and Secret value for all of them.

I can then authenticate with my microsoft creds.

And then you can allow this application access to the data.

I’m then able to read from my personal Outlook account (in this case pulling back the different to-do lists in my personal to-do.

I’ve worked with Azure for years but never with personal accounts, so I didn’t realise that allowing the application access to your personal account would work like this so I was a bit sceptical. However it’s worked exactly how Jon said it would. Appologies for not trying it sooner - it’s been a busy few weeks!

1 Like

Ahhh. I do have an Azure Account. I am actually an IT Professional who works in the Azure / Office 365 space.

I never considered I could create an App Reg in Azure for my live.com account either!!

Thanks for the detailed response :slight_smile:

Yeah I’m an IT Pro for my sins too, with actual Azure certs too which is most embarrassing but since I mostly work with Infra, not apps, and never really with personal accounts only those that are connected to EntraID it never occured to me that it’d work this way.

Good luck with it - hopefully the steps are good enough to get you up and running - I did have more screenshots but was limited to 5 so had to pick the best - that’s why I went a bit word-heavy on the rest.

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