SSRS Role ID and TaskMask
Hello,
I need to find out who has access to what on SSRS. From the User table, I can query something like the following.
Questions:
1) What is Role ID? Is this a 1:1 map to a user?
2) What is TaskMask? Is this a 1:1 map to a specific item (ie folder/report)?
3) How do I find out the mapping (ie the actual user name or folder/report name)?
RoleID
RoleName
Description
TaskMask
RoleFlags
30429381-0F4C-45E9-9136-AB4FE71CCD71
View Folder
View folder structure and reports available (incl report definition) but can't run reports
0000001000000000
0
DF7F6687-DF4E-4D2A-B1A8-B0917EA4E82C
Browser
May view folders, reports and subscribe to reports.
0010101001000100
0
DF7F6687-DF4E-4D2A-B1A8-B0917EA4E82C
Browser
May view folders, reports and subscribe to reports.
0010101001000100
0
30429381-0F4C-45E9-9136-AB4FE71CCD71
View Folder
View folder structure and reports available (incl report definition) but can't run reports
0000001000000000
0
DF7F6687-DF4E-4D2A-B1A8-B0917EA4E82C
Browser
May view folders, reports and subscribe to reports.
0010101001000100
0
DF7F6687-DF4E-4D2A-B1A8-B0917EA4E82C
Browser
May view folders, reports and subscribe to reports.
August 28th, 2010 6:43pm
Roles can be a many-to-many relationship to Users through the PolicyUserRole table.
The TaskMask corresponds to the capabilities assigned to a role in the Role definition page in the Report Manager site settings. These capabilities are assigned to a Role and then assigned to a User through their role membership for a catalog item
(i.e report or folder, etc.)
This query (for SSRS 2008 and R2) should get you started:
select
c.Name
, p.PolicyFlag
, r.RoleName
, r.TaskMask
, u.UserName
from
Catalog c inner join Policies p on c.PolicyID = p.PolicyID
inner join PolicyUserRole pur on p.PolicyID = pur.PolicyID
inner join Roles r on pur.RoleID = r.RoleID
inner join Users u on pur.UserID = u.UserID
[Please vote if helpful]Paul Turley, MVP [Hitachi Consulting] SQLServerBIBlog.com
Free Windows Admin Tool Kit Click here and download it now
August 29th, 2010 10:09am
Hello,
Thanks! That solves my problem. Last question. I notice one of the rows on the Catalog table has null for the Path and Name columns. Is this role indicating if the user has the permission to view the top level page?
August 29th, 2010 11:55am
Hello,
Any idea which table I can join with to find out what each of the TaskMask bit represents?
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2010 4:45pm
Any idea which table I can join with to find out what each of the TaskMask bit represents?
Hi amNotAGeek,
From your question, you might want to get the detailed representation of TastMask, Paule has given you the T-Sql, I just give a little modification to it. You will get the detailed representation of TastMast.
select
c.Name
, p.PolicyFlag
, r.RoleName
, r.TaskMask
, u.UserName
, r.Description
from
Catalog c inner join Policies p on c.PolicyID = p.PolicyID
inner join PolicyUserRole pur on p.PolicyID = pur.PolicyID
inner join Roles r on pur.RoleID = r.RoleID
inner join Users u on pur.UserID = u.UserID
Best regards,
Challen Fu
September 3rd, 2010 12:59pm
I don't know how the TaskMask bits are mapped but I don't think th specifc settings are stored in a table. It should be easy to figure out with a little trial-and-error (create a role, set each permission attribute and watch the results). I
think that's the best you can do.
Paul Turley, MVP [Hitachi Consulting] SQLServerBIBlog.com
Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2010 7:47pm
Paul,
I noticed the "Type" column in the "Catalog" table. Do you have a reference sheet for what each type represents?
I may answer my own question:
1) Folder
2) Report
5) Data Source
8) Data Set
Other values?
Thanks,
Matthew
June 10th, 2011 1:35pm