CRM 2016 – How to find what users have what roles

It is only in adventure that some people succeed in knowing themselves – in finding themselves.

Andre Gide

 

Moving users from one CRM online instance to another CRM online instance can involve many tasks and one of the key tasks is setting up the users with the correct security roles.  This article looks at a recent experience I had moving users from one CRM online instance to another.

Related Hosk CRM blog posts

Here are some other blog posts I have recently written around setting up a CRM environment and moving data between them.

Moving users is not straight forward

This isn’t straight forward.  I will focus on just security roles here because my instance is simple but you should consider other security concerns

  • Access team templates
  • Business units
  • Hierarchy security
  • Field Level security

At lot of this data is configuration data which must be setup for each instance, in a similar way Microsoft Dynamics CRM configuration settings must also be setup.

Security roles are linked with Business units and every business unit has its on version of the security role.

If you are writing Javascript or advanced find and select a security role , you will get results back for each business unit. If you write Javascript checking for security roles you need to use the security rule name.

The XrmServiceToolkit which is a JavaScript framework with built-in functions, makes looking up security role easy as you can see in the blog post below

Simple Way to Check if a User Has a Security Role Using the XrmServiceToolkit/JavaScript

Good practice is not to individually tweak security roles for each business unit, this is possible but will be confusing and you can only export security roles at the root business unit.

If you are setting up users you need to first setup business units

  • Business unit
  • security roles

The security roles are imported using solutions and the security roles will be exist on the default business unit.  Business units cannot be included in solutions so you need to import or create Business units in each CRM instance (amount setting other configuration data).

If you use Business units in workflows it’s important to keep the same guids between CRM instances

What roles do users have?

You can import users into a new CRM instance but you have to assign the security roles manually and the first step is to understand what roles users have.

Finding current user roles

Sales –> Reports

CRM 2016 - user roles

There is a report called user summary, it’s a bit like the Millennium Falcon, it’s not much to look but it can help to bring down the empire.  It shows each users and what security role they have.  It can be difficult to use so you might find it easier to export to Excel

user summary

Advanced find

CRM 2015 – Advanced find to return all enabled users with a security role

a little tweak to my earlier Advanced find query and it then brought back all users with a specified security role.  The downside is you would need to do this for each security role.   (talking of advanced find you should definitely read this – Why the advanced find is a CRM Developers best friend)

The example below shows finding all the users with the security role System Administrator

CRM 2016 - user roles 2

Manage Roles – Assigning security roles

Once you have created your users, Business units and imported your security roles, it’s time to assign users the correct security roles.  (*note if you have teams, you will need to do these in a new CRM instance).

You can assign individual user to by navigating to the user and clicking Manage Roles button

assign users

select the security roles you want the user to have and press OK

assign users 1

If there are lots of users then assigning security roles individually takes a long time, so you need to do some bulk updating.

Navigate to users

Settings –> Security –> Users

Then use a list to select the users you would like to bulk update

Select the users you want to update

press Manage Roles button

select the roles and press OK

XRMToolBox – User Roles Manager

There is a great tool in the XRMToolbox called the User Roles Manager

XRMtoolbox - user role manager

It’s easy to use and allows you to add one or many security roles to one or multiple users.

Select security roles and users XRMtoolbox - user role manager 1

Press action, which gives you three options

XRMtoolbox - user role manager 2

It has pretty much the same functionality but is easier to navigate and faster to use.  The bonus is you don’t need to open Microsoft Dynamics CRM so you can have it open with a list of users.

 

Advertisement

3 thoughts on “CRM 2016 – How to find what users have what roles

  1. YF August 29, 2016 / 1:15 pm

    Thanks for a great blog Mr Hosk

    /YF

    Like

  2. Mariella Montoni February 16, 2017 / 9:25 pm

    Hello.

    thank you for this post… I have a question not sure if you can answer it… How can I assign a security role to a specific custom workflow?

    thank you!
    Mariella.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.