Patrick Purviance – SQL Server DBA Blog
Blogging impactful solutions for SQL Server DBAs worldwide

SSRS: Failure sending mail: The user or group name ‘Domain\UserName’ is not recognized.Mail will not be resent.

Just ran into this one.   If an SSRS report user comes to you indicating that they’ve attempted to created a subscription and, although it allowed the subscription to be created, the report subscription failed to be sent via email with the following Status:

Failure sending mail: The user or group name ‘Domain\UserName’ is not recognized.Mail will not be resent.

When troubleshooting, I found that the subscription owner account name did NOT match the Windows account name of the user contacting me.  In the end, the root cause was a domain name change for the affected user.  The login name on the SQL Server hosting the ReportServer database still had the old domain name for the user and used that name in the subscription setup, which failed when the credentials were used to generate and send the emailed report.

The quick fix was to execute the following via our SQL Server CMS (Central Mgmt Server):

IF EXISTS (SELECT 1 FROM sys.server_principals WHERE name = ‘DOMAIN\OldUserName’)
BEGIN
     ALTER LOGIN [DOMAIN\OldUserName]
     WITH NAME = [DOMAIN\NewUserName]
END

Hope that helps if you run into this situation in your travels…

-Patrick

2 Responses to “SSRS: Failure sending mail: The user or group name ‘Domain\UserName’ is not recognized.Mail will not be resent.”

  • Michael says:

    2008R2 BOL states:

    NAME = login_name
    The new name of the login that is being renamed. If this is a Windows login, the SID of the Windows principal corresponding to the new name must match the SID associated with the login in SQL Server. The new name of a SQL Server login cannot contain a backslash character (\).

    What version is your solution intended for, thanks?

  • admin says:

    FWIW, I ran the statement against our CMS instance, which included versions of SQL Server 2000 thru 2014. You can’t use SQL Server Logins for SSRS authentication, so the login name must be the associated Windows account. HTH :)

  • Leave a Reply

    Your email address will not be published. Required fields are marked *