An Azure communication platform for deploying applications across devices and platforms.
Azure Communication Services (ACS) Email does not require configuring a conventional sending mailbox; configure an ACS Email domain and authenticate your application to the ACS SMTP endpoint using either SMTP username/client-secret credentials or XOAuth2.
Required ACS configuration
- Create an Azure Communication Email resource and provision either:
- An Azure-managed
*.azurecomm.netdomain, or - Your own custom domain, verified in ACS.
- An Azure-managed
- Connect the Email resource and domain to the ACS resource.
- Register a Microsoft Entra application and create a client secret.
- Grant the Entra application access to the ACS resource:
- Use the built-in Communication and Email Service Owner role; or
- For narrower permissions, use a custom role containing:
-
Microsoft.Communication/CommunicationServices/Read -
Microsoft.Communication/CommunicationServices/Write -
Microsoft.Communication/EmailServices/write
-
- In Azure portal → Azure Communication Services resource → SMTP Usernames, select Add SMTP Username, associate it with the Entra application, and wait until its status is Ready to use. The username can be free-form or email-formatted; if it is email-formatted, its domain must be one of the domains linked to the ACS resource.^1^
SMTP client settings
Configure the sending application or device as follows:
| Setting | Value |
|---|---|
| Protocol | SMTP submission |
| Server/smart host | smtp.azurecomm.net |
| Port | 587 recommended; 25 also supported |
| Encryption | STARTTLS enabled, TLS 1.2 or later |
| Username | SMTP Username created in the ACS resource |
| Password | Client secret of the linked Entra application |
| From address | MailFrom address belonging to the provisioned or verified ACS Email domain |
Use the DNS hostname rather than an IP address. The selected port must also be permitted by the application’s network, firewall, or ISP.^1^
The username is therefore not an Exchange mailbox username, and its password is not a mailbox password. ACS maps the SMTP Username to the Entra application and uses that application’s identity to authorize email submission.
Authentication choices
ACS supports these two documented SMTP authentication patterns:
- SMTP username and password: supply the ACS SMTP Username as the username and the Entra application client secret as the password.^1^
- XOAuth2: obtain an Entra application token for the
https://communication.azure.com/.defaultscope, then authenticate the SMTP connection using the SMTP Username and access token. Microsoft provides a .NET MailKit implementation of this flow.^2^
A minimal MailKit connection using XOAuth2 is:
using var client = new MailKit.Net.Smtp.SmtpClient();
await client.ConnectAsync(
"smtp.azurecomm.net",
587,
MailKit.Security.SecureSocketOptions.StartTls);
var auth = new MailKit.Security.SaslMechanismOAuth2(
smtpUsername, entraAccessToken);
await client.AuthenticateAsync(auth);
await client.SendAsync(message);
await client.DisconnectAsync(true);
Sender-domain requirements
The message’s From address must use the MailFrom address of the domain provisioned or verified in ACS, not an arbitrary mailbox address. ACS supports SPF and DKIM authentication for Azure-managed and custom domains.^3^
For a custom domain, complete its ACS domain-verification and sender-authentication records before using its MailFrom address. No IMAP, POP, Exchange mailbox, or mailbox-side SMTP AUTH configuration is needed for this outbound ACS flow.
References