Setting Up Microsoft Graph to Send Emails Through Hudu

This guide explains how to set up an Azure App Registration and configure the permissions needed for Hudu to send email through Microsoft Graph.

    Action required: Exchange Online will permanently remove support for Basic authentication with Client Submission (SMTP AUTH) gradually beginning with a small percentage of submission rejections for all tenants on March 1st 2026 and reaching 100% rejections on April 30th 2026 (previously September 2025). After this time, applications and devices will no longer be able to use Basic auth as an authentication method and must use OAuth when using SMTP AUTH to send email. Learn more from Microsoft.

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

graph_add_app_registration.png

 

  • 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

graph_fix.png
  • Paste both values into Hudu

Create a Client Secret

  • Open Certificates & secrets

  • Select New client secret

graph_new_client_secret.png
  • 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

graph_add_permission.png
  • Select Microsoft Graph

  • Choose Application permissions

graph_application_permission.png
  • Add Mail.Send

graph_mail_send.png
  • 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

graph_email_setup.png
  • 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

 

Was this article helpful?
0 out of 1 found this helpful