Security is the primary concern when we create reports in SSRS or SQL Reporting Services. Because, in the corporate world, the manager holds different privileges compared to a salesperson. SSRS provides multi-level security which means, you can restrict the user from accessing the Report Manager, Folders, or reports.
In this article, we will show you how to apply security in SSRS with a practical example.
Home, or Parent Level Security in SSRS
Before we start applying Security in SSRS, Let me open my Report Manager to show the existing reports on our Server. To change the Parent Level Security, Please click on the Site Settings hyperlink at the top right corner.
Once you click on the Site Settings hyperlink, the Report Manager will navigate you to the Site Settings page. On this page, we had three tabs, and we already explained the first tab in the Change Report Manager Title, so please refer to the same.
Please navigate to the Security tab to see the existing users in SSRS Report Manager. From the below screenshot, you can see that there are two users: An administrator (by default), and a User with admin privileges. To add a New Role User, Please select the New Role Assignment option.
That will open the following page. Here you have to add a User or group within the text box and select the appropriate Role. For the SSRS Security demonstration, we created a new Windows user called MSBI, and we are using the same user
Delete Top Level User Security in SSRS
Now you can see the new user (MSBI) with system user privileges. To delete the user, Please check-mark the user and select the delete menu. In this example, we will delete the MSBI user. A message box is displayed for the confirmation of the user deletion. Click OK to delete, and cancel to undo.
Report Level Security in SSRS
To provide security for a single SSRS report, Please click the down arrow beside the report to open the menu items. Please select the Security option from the menu items.
Once you select the Security option, the following page will be displayed. To edit the default settings, please click on the Edit Item Security option.
After you click on the Edit Item Security, a pop-up (confirmation window) box is displayed for the confirmation. It will ask whether you want to add custom security, which is different from parent security. Click OK to add, and cancel to undo.
Next, click the New Role Assignment option to add a new user and assign a new role
Following is the list of roles available for each user in the SSRS Security.
- Browser: This is the basic role that can be assigned to the user. A user with a Browser role can View Reports, Folders, Models, and resources. Apart from this, a user can Manage individual Subscriptions.
- Content Manager: This is the Highest role that a user can get. He can perform all the tasks that are available in the Report Manager.
- My Reports: The user with the role can only work within the My Reports folder. Apart from Security settings, he can do all the things
- Publisher: A user with aPublisher role can create Linked Reports, and manage Data Sources, Reports, Folders, and Models
- Report Builder: He can view the reports.
From the below screenshot, you can see that we are assigning the new user called MSBI and assigning the Browser role to him.
Now you can see the new user called MSBI with the Browser role.
TIP: The above page had one more item called Revert to Parent Security. Clicking this button will erase the setting that we made up to now, and assign the role that we specified in the Home, or Parent Level Security example.
Folder Level Security in SSRS
To provide security at the folder level in SSRS, Please click the down arrow beside the folder (here it is the Charts folder) to open the menu items. Please select the Security option from the menu items.
Once you select the Security option, the following page will be displayed by the report manager. Follow the steps that we specified in the report-level security example.
Add New User Role in SSMS
Instead of using the default user roles, we can use the SQL Server Management Studio to create a new role as per our requirements. To do so, please open the SSMS and select the Server Type as Reporting Services. Don’t forget the credentials to log in to the Server.
Within the Management Studio, Navigate to the Security Folder, then right-click on the Roles folder will open the context menu. Please select the New Role..
Once you choose the New Role.., a new window called New User Role will display. Please provide the Role Name and Valid description (describes the Role).
Next, select the tasks that you want to assign to this Role. From the below screenshot you can that the user can Create linked reports, View reports, and View Data Sources.
Now, please select the Bar Chart using the report Builder Report on the Home page, and go to the Security page. To show our newly created Role, let me click the New Role Assignment option
Now you can the newly created Role. I think we forgot to add the description
You can also change the existing user roles.
Change User Role Settings in SSRS Security
Within the Management Studio, Navigate to the Security Folder, then Expand the Roles folder. Here you can see the default User roles. Please right-click on the Role that you want to see, and select its properties
Once you click on the properties option, a new window called User Role Properties will open. Here you can see the default roles allocated by the Reporting service. If you want, you can change this setting as well.