Search code examples
vb.nett-sqlreporting-servicesssrs-2008

Remove All Permission In SSRS 2008


Must remove all the permissions SSRS 2008 all reports and leave only one group, is there any way via script in PS, VB, T-SQL that performs this task?


Solution

  • I can see 2 ways of doing it:

    The recommended (supported) way

    Go through all reports and restore the parent security.
    This can take a lot of time depending on the number or reports you have.

    The unsupported way

    This should do what you want without too much work, but is quite risky.

    1. Backup your ReportServer DB (important)
    2. Apply the permissions you want on the root in the web interface
    3. Go in the Catalog table and look for the PolicyID of the corresponding entry (it should be the first line, with almost all other columns = NULL, and PolicyRoot = 1)
    4. Execute the following query: update [dbo].[Catalog] set [PolicyID] = <YourRootPolicyID>
    5. (Optional) Clean the PolicyUserRole table, which maps a user to a role and a policy:
      delete from [dbo].[PolicyUserRole] where [PolicyID] <> <YourRootPolicyID>
    6. (Optional) Clean the Policies table, which holds the list of policies (= security settings):
      delete from [dbo].[Policies] where [PolicyID] <> <YourRootPolicyID>

    All your items will now have same the security settings.