Sending Emails using the Microsoft Graph API

If you are setting up MailScheduler for the first time, you can skip the SMTP part of the one-click installer by checking the 'Use Graph API for sending emails' checkbox.

How to set up Mailscheduler with the Graph API

Afterwards, you can go to the settings, and then Mail settings. Here, you can choose between SMTP and Microsoft Graph. To use Graph, you will need to have a Tenant ID, Client ID, and Client secret.

To do this, you will need to create an App Registration in Entra / Azure.

Step 1: Choose a name
Step 2: Choose Single Tenant

Afterwards, you can copy your Tenant ID and Client ID from the overview Part of your App registration:

Entra app overview

Copy and paste them into their respective fields in the Mail Settings.

You will also need to set a return url to where your application is hosted, in Entra. You can copy the correct URL from the config page:

Mailscheduler settings screen

It will need to be entered in the 'Authentication' part of your App registration. Make sure that 'ID tokens' is selected.

Entra Authentication field for an app

API Permissions

After this, you will need to make a secret for Mailscheduler to use, and set the correct permissions. Under API permissions, make sure to have 'Mail.Send', so that you can send mails as a logged-in user.

Secrets

Under the secrets header, make a new client secret, and copy the client secret into correct field.

An example of a secret
Where to fill in the secret

Afterwards, click 'Save Mail Provider Settings', which will open up a dialog, where you need to log in with the account that you want to use to send emails. It is possible you will need to request permission, in which case you will need to wait until you get permission until you can save the settings.

When you get this popup screen, your setup was successful!

Congratulations! You are ready to start sending emails with the Microsoft Graph API.

Last updated

Was this helpful?