Thursday, February 4, 2016

Only the Deployment Administrators are able to use Deployment Manager. You are not a Deployment Administrator

A few days back I come up with following error while accessing the Microsoft Dynamics CRM Deployment Manager on the server

Only the Deployment Administrators are able to use Deployment Manager. You are not a Deployment Administrator.

After spending a few hours, I found directions and fortunately added myself as to Deployment Administrator group.

To try this you just needed access of MSCRM_CONFIG

-- Get Deployment Administrators
SELECT Name, IsDisabled, Name, IsDeleted
FROM [MSCRM_CONFIG].[dbo].[SystemUser]
WHERE DefaultOrganizationId ='00000000-0000-0000-0000-000000000000'


-- Get guid of security roles Administrator
SELECT  Id, [Name], [UniqueifierId] 
FROM [MSCRM_CONFIG].[dbo].[SecurityRole]  
WHERE ((([Name] = 'Administrator')) ) AND (IsDeleted = 0)


-- insert into deployment administrator group
INSERT
INTO [MSCRM_CONFIG].[dbo].[SystemUser](Name, IsDeleted, DefaultOrganizationId, Id, IsDisabled) 

VALUES ('domain\user', 0, '00000000-0000-0000-0000-000000000000', NEWID(), NULL)

--Give security role to user added before
INSERT
INTO [MSCRM_CONFIG].[dbo].[SystemUserRoles](Id, SecurityRoleId, SystemUserId, IsDeleted)
VALUES (NEWID(), 'Administrator GUID', 'User GUID', 0)


 Enjoy!