Deployment

MS CRM 2011: Add new Deployment Administrator through SQL

Here is a short script that has to be executed against MSCRM_Config db to add a new deployment administrator:

Declare @DomainName Varchar(Max)
Set @DomainName = 'Put new deployment admin login here'--i.e. 'ContosoAdministrator'

Declare @Id uniqueidentifier
Select @Id = Id From mscrm_config..SystemUser Where Name = @DomainName

if (@Id is null)
Begin
    Set @Id = NEWID()
    INSERT INTO mscrm_config..SystemUser(Id, Name, DefaultOrganizationId) 
    VALUES(@Id, @DomainName, '00000000-0000-0000-0000-000000000000')
End

INSERT INTO mscrm_config..SystemUserRoles(Id, SecurityRoleId, SystemUserId) 
VALUES(NEWID(), (Select Id From mscrm_config..SecurityRole Where Name = 'Administrator'), @Id)

So the only thing you need to do is to put a domain name of the new deployment administrator in a format DOMAIN\Login like Contoso\Administrator.

This trick is 100% unsupported and can lead to a malfunction of the whole CRM deployment. I suggest you backup MSCRM_Config DB before you run this script.

1 Comment

  1. This is really attentiongrabbing, You’re a very professional blogger. I have joined your rss feed and sit up for in search of extra of your fantastic post. Also, I have shared your site in my social networks! dcgekdbeaegeaefe

Leave a Reply

Your email address will not be published. Required fields are marked *

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