5.6 KiB
| title | description | contentType |
|---|---|---|
| Microsoft credentials | Documentation for Microsoft credentials. Use these credentials to authenticate Microsoft in n8n, a workflow automation platform. | integration |
Microsoft credentials
You can use these credentials to authenticate the following nodes:
- Microsoft Dynamics CRM
- Microsoft Excel
- Microsoft Graph Security
- Microsoft OneDrive
- Microsoft Outlook
- Microsoft Teams
- Microsoft To Do
Prerequisites
- Create a Microsoft Azure{:target=_blank .external-link} account.
- Create at least one user account with access to the appropriate service.
Supported authentication methods
- OAuth2
Related resources
Refer to the linked Microsoft API documentation below for more information about each service's API:
- Dynamics CRM: Web API{:target=_blank .external-link}
- Excel: Graph API{:target=_blank .external-link}
- Graph Security: Graph API{:target=_blank .external-link}
- OneDrive: Graph API{:target=_blank .external-link}
- Outlook: Graph API{:target=_blank .external-link} and Outlook API{:target=_blank .external-link}
- Teams: Graph API{:target=_blank .external-link}
- To Do: Graph API{:target=_blank .external-link}
Using OAuth2
--8<-- "_snippets/integrations/builtin/credentials/cloud-oauth-button.md"
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{:target=_blank .external-link} and follow the instructions below:
- Open the Microsoft Application Registration Portal{:target=_blank .external-link}.
- Select Register an application.
- Enter a name for your app in the Name field.
- In Supported account types, select Accounts in any organizational directory (Any Azure AD directory - Multi-tenant) and personal Microsoft accounts (for example, Skype, Xbox).
- In Register an application:
- Copy the OAuth Callback URL from your n8n credential.
- Paste it into the Redirect URI (optional) field.
- Select Select a platform > Web.
- Select Register to finish creating your application.
- Copy the Application (client) ID.
- Paste it into n8n as the Client ID.
- On your Microsoft application page, select Certificates & secrets in the left sidebar.
- In Client secrets, select + New client secret. Refer to the instructions in Add credentials{:target=_blank .external-link} for further details.
- Enter a description in the Description field, such as
n8n credential. - Select Add.
- Copy the Secret in the Value column.
- Paste it into n8n as the Client Secret.
- If you see other fields in the n8n credential, refer to Service-specific settings below for guidance on completing those fields.
- Select the circle button in the OAuth section to connect a Microsoft account to n8n.
- 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{:target=_blank .external-link}.
Service-specific settings
The following services require extra information for OAuth2:
Dynamics
Dynamics OAuth2 also requires these fields:
- Your Domain
- Region: Select the Dynamics datacenter region you're within. Refer to the Microsoft Datacenter regions documentation{:target=_blank .external-link} for more information on the options and corresponding URLs.
Microsoft (general)
The general Microsoft OAuth2 also requires these fields:
- Scope: Provide a space-separated list of scopes for this credential. Refer to Scopes and permissions in the Microsoft identity platform{:target=_blank .external-link} for a list of possible scopes.
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.