web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Unable to back up the SQL Server Reporting Services encryption key.

(2) ShareShare
ReportReport
Posted on by 31
Hey all,
 
Not a question. But a solution that might help the ones stuck.
 
Upgrading from 10.0.42 to 10.0.44 im getting this error during the ReportingService deployment phase. Unable to back up the SQL Server Reporting Services encryption key. The operation failed with error code 2148734260.
 
I'm running SSRS version: 16.0.1117.43 with SQL server 2019.
 
First check that https://report_server_FQDN/ReportServer is opening correctly.
In my case it gave this error:
“Reporting Services Error An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help The type initializer for 'Microsoft.Data.SqlClient.SqlAuthenticationProviderManager' threw an exception. Could not load file or assembly 'Microsoft.Identity.Client, Version=4.61.3.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Could not load file or assembly 'Microsoft.Identity.Client, Version=4.56.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”
 
Apparently as i analyzed this. It looks like a bug due to incorrect assembly reference. F&O is injecting newer dlls that is disrupting the functioning of SSRS especially the WebServiceURL, and backing up of the encryption keys.

To Solve this, I had to go to the SSRS service while the reporting service is being deployed, and go to the reporting service directory: C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\” 

SSRS is looking for version 4.61.3.0, instead F&O injects a newer version 4.68.0.0.
  1.  Copy the correct dll from "C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\Management\Microsoft.Identity.Client.dll" (in my example this has the same version the SSRS error message was asking for)
  2. Search in all the SSRS directory for Microsoft.Identity.Client.dll with the incorrect version (in my case it was 4.68.0.0)
  3. Rename the dlls to .old and paste the correct dll
  4. Restart SSRS service.
At the time of writing this I just noticed that i could edit the config files and change the referenced assemblies.
 
While i did not test this, it looks like it's the better option and its way more clean.
 
MS please fix.
 
Hope this helps someone.
I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,677 Super User 2026 Season 1 on at
    looks like you are dealing with on-prem or on-box DEV.
    By the way, Encryption key can be regenerated for the SSRS, which would need redeployment of SSRS objects/reports
  • MK-24071946-0 Profile Picture
    31 on at
    @sohaib
    Yes this is on-prem sandbox.
     
    And while you could backup the encryption keys manually in normal circumstances. In this case the injected dlls breaks this feature.
     
    First, i could not backup the keys using the ssrs gui (it was greyed out).
     
    Second, couldn't export them using powershell as it also failed. (Dont have a screenshot of the error)
     
    Third, i tried restoring the keys and it also failed. This whole encryption keyfiasco was broken.
     
    Only way i could get it to work again was a reinstall of the ssrs. But then it would be broken after SF starts deploying the reporting service.
     
     
  • Suggested answer
    AxTech Profile Picture
    847 on at
    Hi, I have been into this issue for more than a week. But it seems to be known issue to Microsoft. 

    As per MS it can be fixed by Add TSG_UpdateSSRSIdentityClient.ps1 script of SSRS Server. And define pre-deployment script.
     
    Scripts for resolving issues in on-premises environments - Finance & Operations | Dynamics 365 | Microsoft Learn

    But I has not fixed the issue for me. The deployment was still pushing the newer dll to the report Server at location:
    C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\ReportServer\bin

    To fix this issue I have replaced the original Identity dll file on following locations before deployment happens: 

    D:\D365SITShare\agent\wp\D365SIT\StandaloneSetup-1467501\Apps\AOS\AXServiceApp\AXSF\Code\ProductConfiguration\bin
    D:\D365SITShare\agent\wp\D365SIT\StandaloneSetup-1467501\Apps\AOS\AXServiceApp\AXSF\Code\bin
    D:\D365SITShare\agent\wp\D365SIT\StandaloneSetup-1467501\Apps\AOS\DixfServiceApp\DixfServicePkg\Code
    D:\D365SITShare\agent\wp\D365SIT\StandaloneSetup-1467501\Apps\Reporting\ReportingServicesBootstrapperApp\ReportingBootstrapperPkg\Code\Scripts

    It is just a workaround solutions which I'm currently running.
  • Verified answer
    MK-24071946-0 Profile Picture
    31 on at
     
    I didnt know this was known by MS, interesting.
     
    BTW here is a better cleaner method to solve this.
     
    Method 2:
    Go to these config files and edit the assembly versions for all files:



    Change to:
    <assemblyIdentity name="Microsoft.Identity.Client" publicKeyToken="0a613f4dd989e8ae" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.99.0.0" newVersion="4.68.0.0" />

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans