Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS - Determine report permissions via ReportServer database tables?

Tags:

How can one programmatically determine logins/users that have permission to access specific SSRS reports?

I want to create a datamart in order to populate reports for managers who want to see who has access to specific reports. We currently assign permissions to Active Directory groups which are then used by SQL Server and SSRS to determine permissions. I want to know if there is a table within SSRS's metadata which tracks how permissions are assigned to reports.

like image 423
Emre Motan Avatar asked Jul 06 '11 17:07

Emre Motan


2 Answers

This is a script that does most of what you want, you can tweak it to your needs:

select C.UserName, D.RoleName, D.Description, E.Path, E.Name  from dbo.PolicyUserRole A    inner join dbo.Policies B on A.PolicyID = B.PolicyID    inner join dbo.Users C on A.UserID = C.UserID    inner join dbo.Roles D on A.RoleID = D.RoleID    inner join dbo.Catalog E on A.PolicyID = E.PolicyID order by C.UserName    

you can run the script on the SSRS SQL ReportServer

like image 82
AndrewBay Avatar answered Oct 06 '22 01:10

AndrewBay


The above script will work but keep in mind that it will also display deleted users - i.e. users that are no longer in Active Directory which may be confusing sometimes.

Also, Microsoft does not officially support any queries against their ReportServer database.

like image 36
Paul Shiryaev Avatar answered Oct 05 '22 23:10

Paul Shiryaev