Adding a user with a role to SSRS report

In this recipe, we will add a user with a few roles to SSRS.

Getting ready

In this recipe, we will add QUERYWORKS\tstark as a browser and Content Manager to the customer list report.

For your environment, you can identify a user you want to add to an existing report and which roles you want to assign to them.

How to do it...

Let's explore the code required to add a user with a role to SSRS:

  1. Open PowerShell ISE as an administrator.
  2. Add the following script and run it:
    $reportServerUri = "http://localhost/ReportServer/ReportService2010.asmx" $proxy = New-WebServiceProxy -Uri $reportServerUri -UseDefaultCredential $type = $Proxy.GetType().Namespace $itemPath = "/Customer Reports/Customer List" #this will hold all ...

Get SQL Server 2014 with PowerShell v5 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.