Export and Import Sitecore Roles and Rights

Created: 8 Jul 2020, last update: 12 Sep 2020

Export and Import Sitecore Roles and Rights

Regularly a lot of Sitecore Roles are needed to set up the correct right structure. With names for multisite solutions with many regional editors. Sometimes the item rights are serialized in, for example Unicorn and are included in the deployment, on the other hand that is not always the case and with a growing number of sites, requires sometimes a different role structure.

In Sitecore, the roles are stored in the membership provider, default in the core database in .net membership tables, not in Sitecore items. The item rights are stored on the item itself. They are linked based on the name not on a GUID. So sometimes it would be super handy to be able to export on a built-up roll structure on test or UAT and importer on production.

The Sitecore Security Rights Reporting Module now has Export and Import roles with the Rights on Items. This module is typical for Admin, Client Securing employees who are not always adept with PowerShell and need specialist tools to save time.

What the Export do:

  • Export the Selected Roles, including the roles in Roles (you can select any roles, but typically is for your custom roles)
  • Export all item rights in the master database where the selected roles are present. (so it scans all items in the master database)
  • Write the data to a .csv file. (you can easily edit the file and adjust if necessary)

What the Import do

  • First create the roles if they are not exist
  • If all roles are created, the roles in roles are created. Only from the roles that are actually created The nested roles.
  • All Item Rights are set on the item, the rights are added, rights not in the import file will not touched or deleted. Items are match on item path. Not on GUID typically the tool is developed for rights that are on site root items and other hard coded structur. If the path is not found the import tools log it and do nothings with that line in the import.

Uninstall
This Sitecore Security Rights Reporting Module has an uninstall option, so it is very simple to complete remove this tool from a Sitecore instance.

Download
Versie 2.11 and Higher has the import and export tool. GitHub