Dynamics CRM On-Prem

So, in my infinite wisdom I decided to try and resolve an issue (Working on 2 issues at a time, important point.)

First issue: I noticed that one of our CRM services wasn’t actually using one of our production service accounts, no issue at all. Quick fix and a service restart. (ProTip 2: Don’t do this during production hours. Do as I say not as I do). Never an issue. Not actually sure who configured this the first time around, but stuff happens.

The second issue, I was trying to resolve a stupid issue regarding a CRM user account (See where this is going?). Cool, open CRM, settings, administration, add user, save. This is where my heart rate jumped 100BPM.

In my infinity wisdom, I copied the service account into the username, let it populate then hit save.

INSUFFICIENT PERMISSIONS. Contact an administrator.

[Lots of swearwords]+[Panic attack]+[Emotional breakdown as I don’t want to do any sort of restoration during production hours]

O WAIT, I R ADMIN AND KNOW CRM DATABASE. THIS COULD BE WORSE.

  1. Open up SSMS
  2. use [CRM DB]
  3. SELECT * From SystemUserBase where DomainName = ‘domain\serviceaccount
  4. Copy the SystemUserID

Run the following scripts (Taken from: https://markuserlandsson.wordpress.com/2014/10/02/adding-dynamics-crm-service-account-as-a-crm-user/ ) – With a modification

Note: This SQL will error regarding table references, delete from said tables too.

Restart services / Reboot as required.

ProTip: ONE TASK AT A TIME.
ProTip 2: DON’T ADD SERVICE ACCOUNTS AS USERS UNLESS YOU WANT TO BE LOCKED OUT OF ALL PERMISSIONS.
ProTip 3: BREATHE.

November 6, 2019

Dynamics CRM ProTip: NEVER add a service account as a user account

So, in my infinite wisdom I decided to try and resolve an issue (Working on 2 issues at a time, important point.) First issue: I noticed […]