ConfigMgr SSRS – UserTokenSIDs contains an error | Quisitive

“The trust relationship between this workstation and the primary domain failed”

UserTokenSIDs contains an error

A few days ago I began receiving errors when running reports in the ConfigMgr console and the web portal.

1The DefaultValue expression for the report parameter UserTokenSIDs contains an error: “The trust relationship between this workstation and the primary domain failed”. (rsRuntimeErrorInExpression)

A few other very generic errors were displayed as well, but this one was the most prevalent and detailed (if you call that detailed).

The errors occurred for every user when executing any report that adheres to ConfigMgr RBAC.  Custom reports that don’t use the fn_rbac_* functions worked fine.

The only logged errors I found were in the ReportServerService__mm_dd_yyyy_##_##_##.log and resembled these

1234567library!ReportServer_0-36!7630!05/04/2020-14:48:03:: i INFO: Call to GetItemTypeAction(/ConfigMgr/Software Distribution – Content/Client Data Sources). User: DomainUserID.library!ReportServer_0-36!7630!05/04/2020-14:48:03:: i INFO: RenderForNewSession(‘/ConfigMgr/Software Distribution – Content/Client Data Sources’)library!ReportServer_0-36!4e58!05/04/2020-14:48:03:: i INFO: Call to GetItemTypeAction(/). User: NT AUTHORITYSYSTEM.library!ReportServer_0-36!7630!05/04/2020-14:48:04:: i INFO: Using folder D:Program FilesMicrosoft SQL ServerMSRS13.MSSQLSERVERReporting ServicesRSTempFiles for temporary files.library!ReportServer_0-36!7630!05/04/2020-14:48:05:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: , Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The item ‘/ConfigMgr_UYH/Report Resources/Report_Header_Left.png’ cannot be found.;library!ReportServer_0-36!7630!05/04/2020-14:48:05:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: , Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The item ‘/ConfigMgr_UYH/Report Resources/Report_Header_Center.png’ cannot be found.;library!ReportServer_0-36!7630!05/04/2020-14:48:05:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: , Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The item ‘/ConfigMgr_UYH/Report Resources/Report_Header_Right.png’ cannot be found.;

and these

12345library!ReportServer_0-36!8bb0!05/04/2020-14:56:53:: i INFO: Call to GetItemTypeAction(/ConfigMgr/Software Distribution – Content/Peer cache source content rejection). User: DomainUserID.processing!ReportServer_0-36!8bb0!05/04/2020-14:56:53:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Exception of type ‘Microsoft.ReportingServices.ReportProcessing.ReportProcessingException’ was thrown.;processing!ReportServer_0-36!8bb0!05/04/2020-14:56:54:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Exception of type ‘Microsoft.ReportingServices.ReportProcessing.ReportProcessingException’ was thrown.;library!ReportServer_0-36!2ba8!05/04/2020-14:56:54:: i INFO: Entering StreamRequestHandler.ExecuteCommand – Command = StyleSheetlibrary!ReportServer_0-36!2ba8!05/04/2020-14:56:54:: i INFO: Exiting StreamRequestHandler.ExecuteCommand – Command = StyleSheet (success)

As far as anyone can remember or tell, no changes to SSRS, ConfigMgr rights, ConfigMgr accounts, etc. had been changed.

Ultimately, restarting the SQL Server Reporting Services windows service (which is set to runas a NT ServiceReportsServer) resolved the issue.

I have created a script to help with keeping your Hyper-V servers free of unneeded ISO files. This script will create a list of all ISO files in a folder and its subfolders. Then, it will compare the list to the ISO files which are attached to a VM. After this, it will display all of ISO files that are not attached to a VM.

To run the script you need to save it as a PS1 and change the $folder variable to the folder you want to search.


$folder = <span class="str">&quot;D:\Virtual Machines&quot;</span>
 
<span class="rem">#Find ISO files</span>
$Disk = Get-ChildItem $folder –Recurse -Include *.iso `
    | ForEach-Object -Process {$_.FullName}
<span class="rem">#Find attached ISO files</span>
$computer = gc env:computername
$vm = Get-VM -ComputerName $computer
Foreach ($vm <span class="kwrd">in</span> $vm) 
    { 
        $ISO = Get-VMDvdDrive $vm
        $Path = $ISO.Path
        If ($path <span class="preproc">-ne</span> $NULL)
        {
        $Disk = $Disk.Replace($Path, <span class="str">&quot;&quot;</span>)
        }
    }
<span class="rem">#Display unattached ISO file</span>
$Disk

This script was written and tested using Windows Server 2012 RTM (Build 9200).