Create Deployment Administrator via Database

Recently I had to make some changes to a CRM server and needed to run the Deployment Manager tool. However, I had performed the installation with an account that had elevated security rights to my own one. In such a situation, proper protocol and best-practice administration dictates that one asks the appropriate individual to simply create a new Deployment Administrator. However, if you wanted to circumvent the rules, here’s how:

1. Open your user record in Microsoft CRM and copy your user id (Ctrl + N),

2. Open Microsoft SQL Server Management Studio, right click on the MSCRM_CONFIG database and select ‘New Query’,

3. Run the following query to work out your Id and UserId from the SystemUserOrganisations table:


select Id, UserId
from SystemUserOrganizations
where CrmUserId = 'f01af5f8-959e-de11-9f0f-00188bfcb0e0' // replace with your CrmUserId

4. Now use the returned Id and UserId and insert into the SystemUserRoles table:


insert into SystemUserRoles
([Id]
,[SecurityRoleId]
,[SystemUserId]
,[IsDeleted])
values
('F51AF5F8-959E-DE11-9F0F-00188BFCB0E0' // replace with your ID returned above
,'19cfbc8d-77ed-459e-9909-1bf1cc1b0430'
,'F31AF5F8-959E-DE11-9F0F-00188BFCB0E0' // replace with your UserId returned above
,'False')

You should be able to access the Deployment Manager now.

Advertisements