Today I got a question about retrieving the GUID for a newly created OpsMgr  Report Operator User Role in OpsMgr 2007 SP1.

When I asked why they wanted to know the GUID for this new Report Operator User Role they answered they needed this GUID on the Report Server for configuring permissions to certain reports.

There used to be a Securing Reports pdf on the System Center Forum website but I cannot find it anywhere else anymore. So I’m not sure if this describes all the steps to Secure an OpsMgr Report in OpsMgr 2007 SP1 so I though it would be handy to publish the steps here if you are looking for them.

Back to the original question about retrieving the GUID for a Report Operator Role. The easiest way is using PowerShell. I used the next command to retrieve the GUID:

Get-Userrole | where {$_.Name –match “Test Report Operator Role”}

or

Get-Userrole | format-List Name, ID

Here are all the steps to Secure an OpsMgr Report for a newly created Report Operator Role:

1. Create a Report :-)

2. Create new Report User Role using PowerShell

So here is a script to create a new Report Operator user role using Command Shell:

$mg = (get-item .).ManagementGroup
$reportOperator = $mg.GetMonitoringProfiles() | where {$_.Name -eq "ReportOperator"}
$obj = new-object Microsoft.EnterpriseManagement.Monitoring.Security.MonitoringUserRole

$obj.Name = "TestReportOperatorRole"
$obj.DisplayName = "Test Report Operator Role"
$obj.Description = "Test Report Operator Role"
$obj.MonitoringProfile = $reportOperator

$mg.InsertMonitoringUserRole($obj)

After you execute this script “Test Report Operator Role” appears in UI and you would be able to add users to it using User Role Properties dialog.

From: http://blogs.msdn.com/eugenebykov/archive/2007/10/13/creating-new-report-operator-user-role.aspx

3. Go to Report Server (http://servername/reports)

4. Click on Show Details from the Report you want to configure access to.
clip_image002

5. Click on Edit
clip_image004

6. Click on Security
clip_image006

7. Click on New Role Assignment
clip_image008

8. Insert GUID from New Report Operator Role.
GUID can be found using the next PS command:
get-userrole | where {$_.Name –match “Test Report Operator Role”}