SSRS — Logon failed for the unattended execution account.

Sean Redmond 0 Reputation points
2023-12-01T15:13:22.4433333+00:00

Hi everyone,

I have manually migrated the reports from an old server running SQL Server 2014 to a new one running 2022. Most of it has gone mostly well but there are still problems with the account governing unattended executions.

We have a dedicated domain login with read-write rights to the folders in question (which are also FTP-enabled). Many of the reports are generated automatically and saved in these folders so that they can be accessed automatically & remotely. This login is able to save files on remote shares on the domain in the old reports server (running SSRS 2014) but not, oddly enough, on the new reports server (running SSRS 2022). Both are running period-appropriate versions of Windows Server.

When I use the dedicated domain login now as the unattended execution account, I get the following error message:

Failure writing file Duplicate Random Alternate Keys : The report server has encountered a configuration error. Logon failed for the unattended execution account.

When I use the dedicated domain login explicitly in the Credentials fields, I get a different error message:

Failure writing file \Path\DuplicateRandomAlternateKeys.xlsx : An impersonation error occurred using the security context of the current user

I, personally, have two work accounts (both domain logins): one for logging on to my VM and one for logging onto servers (via Remote Desktop Connection etc.). Both have access to the destination folders. When I use the former work account as the unattended execution account, I get the same error message but when I use the latter, it works fine. The service account for Reporting Services in both old & new reports servers is the built account Network Service.

Likewise when I use my latter work account as Credentials, the report is saved without any hassle. The former work account gives the same error message as the dedicated domain account.

My questions are these:

  1. How come the dedicated login works in SSRS 2014 but not in SSRS 2022? What difference is there in how SSRS uses the login to write file remotely?
  2. What is impersonating what?
  3. Does the problem lie in the configuration of the dedicated domain account, the configuration of SSRS 2022 or somewhere else entirely? Active Directory and domain accounts are not my forte.
  4. Are there other factors that I am not taking into consideration? Do I need to set a domain login in the SQL Server Agent service?

Kind regards,

Sean Redmond.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,264 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,860 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sean Redmond 0 Reputation points
    2023-12-01T15:57:48.8666667+00:00

    I think that I have the answer.

    First of all I was concentrating on the Execution Account (in the Report Configuration manager) when Subscription Settings and the File Share Account were the proper place to be.

    Secondly, (to quote the from link'd article below)

    If an explicit file share account and password is configured, then the file share account requires the right to logon (via Allow log on locally) on to the computer running the Reporting Services service. If the file share account does not have the required permissions, subscriptions using the file share account will fail with an error message similar to the following:

    "Failure writing file {file} : An impersonation error occurred using the security context of the current user."

    This is why my latter work account works but neither of the other two domain accounts.

    https://learn.microsoft.com/en-us/sql/reporting-services/install-windows/subscription-settings-and-a-file-share-account-configuration-manager?view=sql-server-ver16

    0 comments No comments