Share via

How to delete an orphan user from On premise Powerbi report server Site Setting using Powershell Script

Sandeep Mawri 0 Reputation points
2026-02-11T05:46:15.0733333+00:00

In the On-Premise Power BI Report Server setup one user has been migrated from Corp to AHM domain. But in the On-Premise Power BI Report Server Site settings his username can be seen as Content Manager. Since the powerbi is not able to verify the old account with AD on-premise power bi report server goes in a hang state. Because of this issue, user is not able to add or delete any user from the On-Premise Power BI Report Server. As a initial step checked data for the User in the reporting DB but not able to find any relevant data. Can anyone provide a powershell script to delete/Add/Update any user.

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.

0 comments No comments
{count} votes

Answer recommended by moderator
  1. kagiyama yutaka 1,165 Reputation points
    2026-02-22T19:57:32.13+00:00

    Hi sandeep,

    I think the portal drop you’re seeing comes from a broken ACL chain, not the script itself. PBIRS keeps all folder perms as SID‑based policies, so when old SID can’t resolve, any per‑folder role edit may choke the portal. If u push full SetPolicies() with only the valid SID, the server rewrite the whole ACL tree and the orphaned entries fall out cleanly.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Lakshmi Narayana Garikapati 920 Reputation points Microsoft External Staff Moderator
    2026-02-11T12:27:10.92+00:00

    Hi Sandeep Mawri,

    I understand the challenge you’re facing after migrating a user from Corp to AHM domain. The Power BI Report Server UI can hang when it tries to validate an account that no longer exists in AD. Fortunately, you can manage users and roles directly via PowerShell using the ReportingServicesTools module. Here’s a quick outline:

    1. Install the module: Install-Module -Name ReportingServicesTools -Force
    2. Connect to your Report Server: $ReportServerUri = "http://<YourServerName>/ReportServer" $RS = Connect-RsReportServer -ReportServerUri $ReportServerUri
    3. Remove the old user: Remove-RsCatalogItemRole -Path "/" -ReportServerUri $ReportServerUri -UserName "Corp\OldUser"
    4. Add the new user: New-RsCatalogItemRole -Path "/" -ReportServerUri $ReportServerUri -UserName "AHM\NewUser" -RoleName "Content Manager" This way you can bypass the UI and directly update user permissions. You can also script updates for multiple users by looping through a list of accounts.

    Thanks,

    Lakshmi.

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.