This guide explains how to set up an Azure App Registration and configure the permissions needed for Hudu to send email through Microsoft Graph.
Prerequisites
Access to the Azure Portal
Admin permissions to create app registrations and grant API permissions
Hudu instance ready for configuration. Must be on version 2.4.0 or later.
Create an App Registration in Azure
Log in to portal.azure.com
Open Microsoft Entra ID
Go to App registrations
Select New registration
Enter a name for the application
Set Supported account types to Single tenant
Leave the Redirect URI field empty
Click Register
Copy Required IDs
-
After the app is created:
copy the Tenant ID and Application (client) ID
Paste both values into Hudu
Create a Client Secret
Open Certificates & secrets
Select New client secret
Assign a name and choose an expiration period
Click Add
Copy the Value (not the Secret ID)
Paste the secret value into Hudu
Add Microsoft Graph Permissions
Go to API permissions
Choose Add a permission
Select Microsoft Graph
Choose Application permissions
Add Mail.Send
Save the changes
Grant Admin Consent
While still in API permissions, select Grant admin consent for your organization
Confirm the action
The status should update to show the consent is granted
To limit Microsoft Graph application access using Exchange Online RBAC, see Implementing Role-Based Access Control (RBAC) for Microsoft Graph Applications .
In Hudu
Navigate to Admin > Email Setup
Under Configuration, select Microsoft Graph
Paste Tenant ID, Application (client) ID, and Secret value
-
Enter from address
This MUST be either a licensed user inside of M365, or
A shared mailbox
Enter Display Name
Save the Settings
Test