Skip to content

Microsoft credentials#

You can use these credentials to authenticate the following nodes:

Prerequisites#

  • Create a Microsoft Azure account.
  • Create at least one user account with access to the appropriate service.

Supported authentication methods#

  • OAuth2

Refer to the linked Microsoft API documentation below for more information about each service's API:

Using OAuth2#

Note for n8n Cloud users

Cloud users don't need to provide connection details. Select Connect my account to connect through your browser.

Some Microsoft services require extra information for OAuth2. Refer to Service-specific settings for more guidance on those services.

To configure OAuth2 from scratch, register an application with the Microsoft Identity Platform and follow the instructions below:

  1. Open the Microsoft Application Registration Portal.
  2. Select Register an application.
  3. Enter a name for your app in the Name field.
  4. In Supported account types, select Accounts in any organizational directory (Any Azure AD directory - Multi-tenant) and personal Microsoft accounts (for example, Skype, Xbox).
  5. In Register an application:
    1. Copy the OAuth Callback URL from your n8n credential.
    2. Paste it into the Redirect URI (optional) field.
    3. Select Select a platform > Web.
  6. Select Register to finish creating your application.
  7. Copy the Application (client) ID.
  8. Paste it into n8n as the Client ID.
  9. On your Microsoft application page, select Certificates & secrets in the left sidebar.
  10. In Client secrets, select + New client secret. Refer to the instructions in Add credentials for further details.
  11. Enter a description in the Description field, such as n8n credential.
  12. Select Add.
  13. Copy the Secret in the Value column.
  14. Paste it into n8n as the Client Secret.
  15. If you see other fields in the n8n credential, refer to Service-specific settings below for guidance on completing those fields.
  16. Select the circle button in the OAuth section to connect a Microsoft account to n8n.
  17. Log in to your Microsoft account and allow the app to access your info.

For more detail on the Microsoft OAuth2 web flow, refer to Microsoft authentication and authorization basics.

Service-specific settings#

The following services require extra information for OAuth2:

Dynamics#

Dynamics OAuth2 also requires these fields:

Microsoft (general)#

The general Microsoft OAuth2 also requires these fields:

Outlook#

Outlook OAuth also requires these fields:

  • Use Shared Inbox: The API supports accessing a user's primary email inbox or a shared inbox. Turning this on indicates that the credential should access a shared inbox. If selected, you'll also need:
    • User Principal Name: Enter the target user's UPN or ID.