This new feature on R2 brings lots of benefits, especially for those users that don’t need to have access to all the data within ConfigMgr and limit what you allow them to view. Read more about this here:
Now let’s start by adding the DataSetAdminID to the Report.
To do this go to Datasets, right click Add DataSet
In the Name Field enter: DataSetAdminID
Click Use a dataset embedded in my report:
Select the Data Source : Should be the ConfigMgr Default data source or a custom one.
In the Query enter the following query statement:
select dbo.fn_rbac_GetAdminIDsfromUserSIDs (@UserTokenSIDs) as UserSIDs
Click OK to finish the new dataset.
The dataset has been added and also a new prompt.
Let’s now modify the query on Dataset1 and Dataset2 to use the RBAC function.
Dataset1 has been changed; all I did was replace V_ to fn_rbac and add the (@UserSIDs).
Here is the updated DataSet2 .
On the parameters, move the UserTokenSIDs as the first priority.
And that’s all you will need to do to convert your custom report from non RBA to use RBA Function for reports, I hope these instructions were helpful and you can create your new reports ready for RBA. As a bonus for reading this blog post I have uploaded the template reports I used for this blog post here:
Santos Martinez – Sr. PFE – ConfigMgr and Databases