CRM 2011 – License Error – the selected user has not been assigned a security role

I did something very stupid yesterday but luckily I knew what the problem was almost as soon as I had done it.


I was looking to add a user to an organisation so I could login to CRM as a different user with a different security to see what they can do.

I added the user and then before I could add a security role, I couldn’t login and it was complaining I didn’t have the correct security role.  hmmm what had happened had someone remove my user (they could do because there were 3 system admins if there was only one and my user was that user then it can’t be removed).

Next I noticed the person next to me couldn’t login and in fact no one could login.

CRM was completely knocked out again, the 3rd time this week on 3 different CRM 2011 installations, although this time this was completely my fault.

I had added this user to my the DEV CRM organisation which is held on a different server.

I logged onto the problem CRM 2011 server and looked in the event log, there were errors about tracing and .NET 4 errors.

I then looked at the user in the CRM app pools, it was the user I had tried to add to CRM.  This was also the user who was running the CRM services.

Oh damn I just added the CRM service account as a user in CRM 2011.

for those of you who do not know (or haven’t installed CRM 2011) never add the CRM service account to an organisation it will break everything.  The CRM Service account CANNOT exist in a CRM organisation, this is one of those important bold messages in the CRM installation instructions, oops.

you also might see this message

ecLib::RetrievePrivilegeForUser failed – no roles are assigned to user. Returned hr = -2147209463, User: [userid]

Microsoft have a KB article for people who do this

The system crashes when you add an account that is running the CRMAppPool as a Microsoft Dynamics CRM user

They explain the cause

By default, when a CRM user is created in Microsoft Dynamics CRM, the user has no security roles. Because the CRM service account is mapped with the newly created user, the CRM service account cannot operate anything. Therefore, the system crashes.

This behavior is by design. Making the account that is running the CRMAppPool into a Microsoft Dynamics CRM user is not supported.


The resolution isn’t that helpful

Keep the CRM service account as a dedicated service account.


What I would have really liked to do was to remove the service account user from the CRM organisation but I couldn’t login to do this, I couldn’t figure out what use it was looking at the tables in the SQL database and this wouldn’t be supported so this wasn’t an option.

So I had to add a new user in the active directory (you can use another user already setup), I copied the previous user.  I then when to ADD/REMOVE programs and clicked on CRM 2011 and chose Repair.

I then put in the new user into the service account choices in the repair.  I had to add the user to the performance counter, you can read how to do that here .

Once the CRM 2011 repair had gone through CRM 2011 was back up and working.  Running the repair is easier than changing all the places where the CRM service account is used and it might also change some other settings in the SQL database and possible active directory groups.

I’m not entirely sure why adding the service account to CRM 2011 causes this error but I think it’s basically to do with privileges, when you add a user they start off with no user role, this might mean it can’t read certain tables which the service account needs to do to work properly.

Luckily I managed to fix CRM 2011 pretty quickly before anyone started to complain but one of the reason was because I did it at 5.15 so most people were off home but I did have to stay an extra 30 minutes after work to fix it.


CRM 2011 the account specified to run the Microsoft dynamics crm application does not have performance counters

If you have installed CRM 2011 then you will often get this error.  I thinks it due to some new performance checking functionality put into CRM 2011.

This problem is complaining that the user (service account) you have specified to run the CRM the CRMApp pools and the CRM services isn’t in the Performance Monitor Users group.

This group isn’t an active directory but it’s a group on the CRM 2011 Server.

I have fixed this problem a few times but I saw this blog post by the yellow duck guy !!! and he has some step by step instructions on how to add the user to the group

  1. From windows, go to: Start > Administrative Tools > Computer Management
  2. Select System Tools > Local Users and Groups > Groups
  3. Select the Performance Log Users. Then right-click on Performance Log Users and select Add to Group
  4. Click Add and select your service account
  5. Click OK to complete