Create an Azure App for Nylas v3
The Nylas API v3 is in public beta. It might contain bugs, and might change before it is generally available. See the v3 Beta documentation for more information.
This page explains how to create and configure a Microsoft OAuth application to use with the Nylas v3beta API. It should be pretty familiar, but some things are different including:
- Updated Supported account types to be Account in any organizational directory and personal Microsoft accounts to allow for OAuth of personal accounts
- Updated Authorized redirect URI (
https://api.us.nylas.com/v3/connect/callback
) for Hosted Authentication - Removed EWS and EAS related scopes
- cURL request example to connect your GCP to Nylas
If you don't already have one, create your free Microsoft Azure account. You'll use this account to create the Microsoft developer application that is used for authenticating end users using OAuth with Nylas.
Create an OAuth Application to use with v3beta
Using the Azure web portal, create an app for authenticating your users to Microsoft 365.
Log in to Azure
- Browse to the Microsoft Azure Portal and log in.
- In the menu, click Azure Active Directory.
- Click App Registrations.
- Click New Registration.

New App Registration
-
Give your application a name. This will be visible to your users.
-
Set the audience for this app to Account in any organizational directory and personal Microsoft accounts to be able to log in to any Microsoft account. If you're building an internal app, you can restrict it to internal accounts by setting it to Accounts in this organizational directory only
-
Set the Redirect URI to Web
- If you are using Hosted Authentication, use
https://api.us.nylas.com/v3/connect/callback
. - If you are using Custom Authentication, use your app's callback URI.
- If you are using Hosted Authentication, use
-
Click Register
Enable the Required APIs
Next, add the permissions your application needs in order to function to the Azure app's Manifest. This enables the APIs your application requires.
- Microsoft Graph
offline_access
- Requiredopenid
- Requiredprofile
- RequiredUser.Read
- RequiredCalendars.Read
- Read user calendarsCalendars.ReadWrite
- Read and write to user calendarsMail.Send
- Send mail as a userMail.ReadWrite
- Read and write access to user mail
Create OAuth Credentials
- From the Azure portal, go to Home > Azure Active Directory > App Registrations, and click the app you want to configure.
- On the left, click Certificates & secrets > New client secret.
- Enter a description and set an expiration date of 24 months.
- Click Add.
- Copy the value from the Azure Client secrets page and save it to your secrets manager. Azure only shows the value once, and if you navigate away from this page you cannot retrieve the key value.
Note: Azure credentials include an expiration date. When these credentials expire you must refresh or regenerate them.
Copy the Client ID
In the Azure portal, go to the App Registrations page and copy the Application (client) ID.

Add Microsoft Integration to Nylas
Note: use tenant: "common"
to allow authentication for accounts outside of your organization.
curl -X POST https://api.us.nylas.com/v3/integrations \
--header 'Authorization: Bearer <API_Key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "microsoft example",
"provider": "microsoft",
"settings":
{
"client_id": "<microsoft_cliend_id",
"client_secret": "<microsoft_client_secret"
"tenant": "common"
},
"scope": [
"offline_access",
"openid",
"profile",
"User.Read",
"Calendars.Read",
"Calendars.ReadWrite",
"Mail.ReadWrite",
"Mail.Send"
]
}