Help Docs

How to Connect Microsoft Apps to n8n

Step-by-step guide to creating Microsoft OAuth2 credentials in Azure — including API permissions, admin consent, and connecting to your Awesomate-hosted n8n instance.

Last updated: April 2026 Estimated time: 15–20 minutes

Applies to:

Microsoft Outlook Microsoft Teams Microsoft Excel 365 Microsoft OneDrive Microsoft SharePoint Microsoft To Do Microsoft Dynamics CRM

In This Guide

  1. Overview & Prerequisites
  2. Video Walkthroughs
  3. Create a Microsoft Azure Account
  4. Start Creating the Credential in n8n
  5. Register an App in Azure
  6. Configure API Permissions (Microsoft Graph)
  7. Grant Admin Consent
  8. Create a Client Secret
  9. Connect Your Account in n8n
  10. Troubleshooting: "Need Admin Approval"
  11. Reference Links

1. Overview & Prerequisites

To use any Microsoft service (Outlook, Teams, Excel, OneDrive, SharePoint, etc.) inside your n8n workflows, you need to create an OAuth2 credential. This involves three key phases:

  1. Register an application in Microsoft Azure and get a Redirect URI from n8n.
  2. Configure API permissions so n8n can access the specific Microsoft services you need (mail, calendar, files, etc.).
  3. Grant admin consent, create a Client Secret, and connect everything in n8n.
Awesomate-Hosted n8n (Self-Hosted) Because your n8n instance is hosted by Awesomate on our Kubernetes infrastructure, you'll need to complete the full OAuth2 setup described below. This is different from n8n Cloud, where you can simply click "Connect my account" without any Azure configuration.

Before you begin, make sure you have:

  • A Microsoft account — either a personal account (e.g. Outlook.com, Hotmail) or an organisational/work account (Microsoft 365).
  • Access to the Microsoft Azure Portal — you can create a free account if you don't have one.
  • Access to your Awesomate-hosted n8n instance.
  • If using a corporate Microsoft 365 account, your IT administrator may need to grant admin consent (see Section 7 and Section 10).

2. Video Walkthroughs

If you prefer to follow along visually, these two video guides cover the core process. Note that the written guide below includes additional detail around API permissions that the videos may skim over.


How to Get Microsoft OAuth Credentials for n8n

Full walkthrough of Azure app registration, client secret creation, and connecting to n8n.


Connect n8n with Microsoft 365 — Step by Step

Covers Azure signup, app registration, and connecting credentials including secret expiry settings.

3. Create a Microsoft Azure Account

If you already have an Azure account, skip ahead to Section 4.

Navigate to portal.azure.com and sign in with your Microsoft account.

If you don't have an Azure account, you'll be prompted to create one. Click Try Azure for free. Azure offers a free tier — your credit card won't be charged unless you manually upgrade to pay-as-you-go pricing.

Complete the sign-up form with your details. Select "For personal use" (or your organisation if applicable), verify your identity, and click Sign up.

4. Start Creating the Credential in n8n

Phase 1 — n8n Setup & Azure Registration

Before completing the Azure registration, you need to grab the OAuth Redirect URI from your n8n instance and identify the credential type you need.

Open your Awesomate-hosted n8n instance. Click the Create workflow button, then click the dropdown arrow and select Create credential. Search for "Microsoft" and select the specific service you want to connect (e.g. Microsoft Outlook).

n8n credential creation dialog with 'microsoft' search showing available Microsoft services
Step 4.1 — Search for "Microsoft" in the n8n credential creation dialog and select the service you need.

Click Continue. You'll see the credential setup form with fields for Client ID and Client Secret. At the top, you'll find the OAuth Redirect URL — click the copy icon to copy this URL. You'll need it in the next step.

Keep This Tab Open Leave the n8n credential form open — you'll come back to paste in your Client ID and Client Secret shortly.

5. Register an App in Azure

Now we register an application with the Microsoft Identity Platform. This is what gives n8n permission to interact with Microsoft services on your behalf.

In the Azure Portal, navigate to App registrations (or search for "App registrations" in the portal search bar). Click + New registration.

Fill in the registration form:

  • Name: Enter something descriptive like n8n – Awesomate.
  • Supported account types: Select "Accounts in any organizational directory and personal Microsoft accounts" (multi-tenant + personal). This is the recommended option for most users.
  • Redirect URI: Paste the OAuth Redirect URL you copied from n8n. Set the platform to Web.
Azure Register an application form showing app name, multi-tenant account type selection, and Redirect URI from n8n
Step 5.2 — Register the application with your app name, multi-tenant account type, and the Redirect URI copied from n8n.
Important: Multi-tenant is Required You must choose a multi-tenant option. The single-tenant option will not work with n8n's OAuth flow.

Click Register. Azure will create your application and redirect you to the app's Overview page.

On the Overview page, locate the Application (client) ID. Copy this value — you'll paste it into n8n later.

Azure app overview page displaying the Application (client) ID with copy button
Step 5.4 — Copy the Application (client) ID from the app overview page. You'll need this for n8n.

6. Configure API Permissions (Microsoft Graph)

Phase 2 — API Permissions

By default, your new app only has the basic User.Read permission. You need to add the specific permissions that n8n requires to access mail, calendar, contacts, files, and sites on your behalf.

In your app registration, click API permissions in the left-hand navigation. You'll see the default User.Read permission listed.

API permissions page showing the default User.Read permission as the only configured permission
Step 6.1 — The default API permissions. You'll need to add more permissions for n8n to access mail, calendar, files, etc.

Click + Add a permission. In the panel that opens, select Microsoft Graph — this is the API that handles Outlook, Excel, OneDrive, Calendar, and more.

Request API permissions panel with Microsoft Graph highlighted as the API selection
Step 6.2 — Select "Microsoft Graph" as the API to configure permissions for.

Select Delegated permissions. This ensures n8n acts on behalf of your signed-in user rather than as a background service.

Permission type selection showing Delegated permissions option selected
Step 6.3 — Choose "Delegated permissions" so n8n acts on behalf of your signed-in user.

Now add the required permissions. You'll search for and tick each permission category below. After selecting all the permissions you need, click Add permissions.

Permissions to Add

The table below lists all the permissions you should add. You don't need every category — only add the ones relevant to the Microsoft services you plan to use in n8n. However, we recommend adding all of them for maximum flexibility.

Category
Permissions
Used For
OpenID
offline_access
Keeps n8n connected long-term via refresh tokens
Mail
Mail.Read, Mail.ReadWrite, Mail.Send
Outlook — reading, writing, and sending email
Contacts
Contacts.Read, Contacts.ReadWrite
Outlook — reading and managing contacts
Calendars
Calendars.Read, Calendars.ReadWrite
Outlook — reading and managing calendar events
Sites
Sites.Read.All, Sites.ReadWrite.All
SharePoint — reading and writing to sites
Files
Files.Read, Files.ReadWrite
OneDrive & Excel — reading and writing files
Why offline_access is critical Without offline_access, n8n can only use your Microsoft connection during a single session. With it, n8n receives a refresh token that keeps the connection alive long-term — which is essential for automated workflows that run on a schedule.

Here's what each permission step looks like in Azure:

Adding offline_access permission under the OpenID category in Microsoft Graph
Step 6.4a — Add the offline_access permission so n8n stays connected long-term.
Adding Mail.Read, Mail.ReadWrite, and Mail.Send delegated permissions
Step 6.4b — Add Mail permissions: Mail.Read, Mail.ReadWrite, and Mail.Send.
Adding Contacts.Read and Contacts.ReadWrite delegated permissions
Step 6.4c — Add Contacts permissions: Contacts.Read and Contacts.ReadWrite.
Adding Calendars.Read and Calendars.ReadWrite delegated permissions
Step 6.4d — Add Calendar permissions: Calendars.Read and Calendars.ReadWrite.
Adding Sites.Read.All and Sites.ReadWrite.All delegated permissions for SharePoint
Step 6.4e — Add Sites permissions: Sites.Read.All and Sites.ReadWrite.All (SharePoint).
Adding Files.Read and Files.ReadWrite delegated permissions for OneDrive and Excel
Step 6.4f — Add Files permissions: Files.Read and Files.ReadWrite (OneDrive/Excel).

Double-check that offline_access is included in your permission list. This is easy to miss and is essential for n8n to maintain a persistent connection.

Permission list confirming offline_access is explicitly selected among all permissions
Step 6.5 — Confirm that offline_access is explicitly selected in your permissions.
Phase 3 — Consent & Secrets

After adding all the necessary permissions, you need to grant admin consent so that these permissions are active for your organisation.

Back on the API permissions page, you should now see all your requested permissions listed (approximately 15 including the default User.Read). Review them to make sure everything looks correct.

Full API permissions summary showing all 15 requested permissions before granting admin consent
Step 7.1 — Review the complete list of permissions before granting consent.

Click the Grant admin consent for [your organisation] button. A confirmation popup will appear — click Yes to authorize the app.

Admin consent confirmation popup with an admin clicking Yes to authorize the app for the entire organisation
Step 7.2 — Click "Yes" in the admin consent popup to authorize the app for your organisation.

Once consent is granted, all permissions should now display green checkmarks in the Status column. This confirms everything is authorised and ready.

API permissions list showing green checkmarks next to every permission — consent granted successfully
Step 7.3 — All permissions now show green checkmarks. Consent has been granted successfully.
Personal Microsoft Accounts If you're using a personal Microsoft account (not a corporate/organisational one), you may not see the "Grant admin consent" button. In that case, consent will be granted when you click "Connect my account" in n8n and accept the permissions in the popup. Skip ahead to Section 8.

8. Create a Client Secret

The client secret acts as your application's "password" — n8n uses it along with the Client ID to authenticate with Microsoft.

In the left-hand navigation of your app registration, click Certificates & secrets.

Certificates and secrets page in Azure app registration — the area where you create the app's password
Step 8.1 — Navigate to the "Certificates & secrets" page to create your app's secret.

Under the Client secrets tab, click + New client secret.

Enter a Description (e.g. n8n credential) and choose an expiry period. We recommend 24 months (730 days) to reduce how often you need to rotate secrets. Click Add.

Add a client secret dialog showing description field and 24-month expiry selection
Step 8.3 — Create a new client secret with a description and 24-month expiry.

Your new secret will appear in the list. Immediately copy the Value (not the Secret ID) by clicking the copy icon.

Copy the Value NOW — This Is Your Only Chance! There are two columns: Value and Secret ID. You need the Value column. Once you navigate away from this page, Azure will never show the secret value again. If you lose it, you'll need to delete the old secret and create a new one.
Secret Expiry — Set a Calendar Reminder! Client secrets expire after the period you chose (e.g. 24 months). When they expire, your n8n workflows using Microsoft services will stop working. Set a calendar reminder to rotate your secret before it expires. You can always come back here in Azure and create a new one — then update the Client Secret in your n8n credential.

9. Connect Your Account in n8n

Switch back to your n8n tab where you have the credential form open.

Paste the Application (client) ID you copied in Section 5 into the Client ID field.

Paste the Client Secret value you just copied in Section 8 into the Client Secret field.

Click the Connect my account button. A Microsoft sign-in window will pop up.

Sign in with the Microsoft account you want n8n to use, review the permissions being requested, scroll down and click Accept.

You should see a "Connection successful" confirmation in n8n. Your credential is now ready to use!

You're All Set! Your Microsoft credential is now saved in n8n. You can reuse it across multiple workflows — there's no need to create a new credential each time. Simply select this credential from the dropdown in any Microsoft node (Outlook, Teams, Excel, OneDrive, SharePoint, To Do, etc.).


10. Troubleshooting: "Need Admin Approval"

If you're using a corporate Microsoft 365 / Entra ID (Azure AD) account and you see an error message saying "Need admin approval" when you try to connect, this means your organisation's IT policies require an administrator to approve third-party app access before users can consent.

What This Means

Your organisation's Microsoft Entra ID is configured so that users cannot grant consent to apps on their own. An administrator with the appropriate role (Privileged Role Administrator, Cloud Application Administrator, or Application Administrator) needs to approve the app registration.

What To Do

Contact your IT administrator and share the following information:

  • The Application (client) ID from your Azure app registration.
  • The name of the app you registered (e.g. "n8n – Awesomate").
  • A request to grant tenant-wide admin consent for the application.

Your administrator can grant consent using one of two methods:

Method A: Via the Entra Admin Center

  • Sign in to the Microsoft Entra admin center.
  • Navigate to Entra ID → Enterprise apps → All applications.
  • Find the app registration by name.
  • Click Permissions under Security.
  • Click Grant admin consent and confirm.

Method B: Via Direct URL

The admin can open this URL in their browser, replacing the placeholder values:

https://login.microsoftonline.com/{tenant-id}/adminconsent?client_id={client-id}

Replace {tenant-id} with your organisation's tenant ID (or a verified domain name), and {client-id} with the Application (client) ID from the app registration.

Once the admin has granted consent, go back to n8n and click Connect my account again. It should now work without the approval error.

Microsoft Documentation for Administrators Your IT admin can refer to the official Microsoft guide for full details:




Need Help? If you get stuck at any point, reach out to your Awesomate support contact and we'll get you sorted. You can also email us at hello@awesomate.ai

© 2026 Awesomate — Managed n8n Hosting & AI Automation