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!
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.
I’m not that Azure / personal accounts works in that way, or if it is, then I’m confused
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!
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.
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.
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.
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!
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.