Error "The specified sender domain has not been linked" on sending email

Problem statement

I want to use Auth0 for sending email notifications, such as ‘Verify your email address.’

I have configured Microsoft Azure Communication Services as my custom email service provider. However, I am not receiving any email notifications from Auth0. Instead, I have noticed that if I look in the tenant logs, I see Failed Notification (fn) messages that contain this error:

“Error sending email: The specified sender domain has not been linked.”

What is the reason for this error, and how can I fix it?

Symptoms

Azure CS has been configured as a custom email SMTP provider: Configure Custom External SMTP Email Provider

Within the tenant logs, you will find many Failed Notification (fn) messages that contain this error:

“Error sending email: The specified sender domain has not been linked.”

You can locate all these specific log events using the search string:

description: "Error sending email: The specified sender domain has not been linked."

Each log event will contain an error ‘details’ section similar to this one. You may also encounter this when using the Send a test email function: Configure Azure Communication Services as External SMTP Email Provider

In this case, the log event may contain details of this type:

"details": {
"email_type": "try_provider_configuration_email",
"to": "jane@example.com",
"error": "Error sending email: The specified sender domain has not been linked."
}

Troubleshooting

  1. Check the tenant logs for Failed Notification (fn) messages in the format:

“Error sending email: The specified sender domain has not been linked.”

  1. Review the Azure CS configuration and look for any errors: Configure Azure Communication Services as External SMTP Email Provider

  2. If the tenant has a custom domain configured, check whether it is in a Verified or Pending state. If it is in a Pending state, take the necessary steps to get it Verified, as described in the public documentation: Troubleshoot Custom Domains

Cause

A casual web search will reveal that this is a generic problem experienced by many types of application users. It is not specific to Auth0.

On the Azure side of things, you may have failed to configure an Email Communication Services (ECS) resource and connect it to your Azure Communication Services (ACS) resource before starting to send emails.

Of course, there is a chance that it might be caused by a defect on the Auth0 side of the email transaction, but initially, it is reasonable to assume that the problem is most likely due to a misconfiguration or an absent configuration item on the Azure CS side of things.

Solution

Create an Email Communication Services (ECS) resource and connect it to your Azure Communication Services (ACS) resource before starting to send emails. Please refer to the documentation references below:

If you encounter any difficulties with this configuration, you may need to open a support ticket with Azure.

If you have correctly performed the above configuration and are still experiencing this issue, then either post a question on our Community page (Free tenants) or create a support ticket for Auth0 (Trial/Paid subscription customers only).