Change a Microsoft Dynamics CRM service account

There are situations in which you may need to change the account that is used to run a Microsoft Dynamics CRM service.

Change a Microsoft Dynamics CRM service account by running a repair

The simplest way to change a service account is to run a repair operation and then specify the new service account during the repair. There may be a short downtime as the services are stopped and files are verified and possibly refreshed as part of the repair. For more information, see the Uninstall, change, or repair Microsoft Dynamics CRM Server 2011 topic in the Installing Guide.

To change the CRMAppPool service account, the appropriate permissions must be granted or the CRMAppPool application pool will not start. Additionally, if you are using claims-based authentication the CRMAppPool service account must have permission to access the claims-based authentication token-signing certificate.

Manually change the CRMAppPool service account

To manually change the CRMAppPool service account, include the domain account user in the following groups in Active Directory:

  • Domain Users Active Directory
  • PrivUserGroup
  • SQLAccessGroup

To do this, follow these steps:

  1. Log on to a server as a user who has the domain administrator rights or the rights to update these groups.
  2. Right-click the Domain Users group in Active Directory, and then click Properties.
  3. In the Group name box, type the name of the user who is running the Microsoft Dynamics CRM application pool, and then click OK two times.
  4. Repeat steps b and c for the PrivUserGroup group and for the SQLAccessGroup group.

If you have more than one Microsoft Dynamics CRM deployment installed, multiple groups exist in Active Directory. Use the following steps to determine the groups that you want to update.

Determine the groups to update

  1. Run the following SQL statement against the MSCRM_CONFIG database: select id, friendlyname from organization

    1. Note the GUID. For example, the GUID may be C8AB1D52-9383-4164-B571-4C80D46674E3 Org Name.
    2. Find the PrivUserGroup group and the SQLAccessGroup group in Active Directory. The group name contains the GUID that you noted in step b.
  2. Include the domain account user in the following groups on the Microsoft Dynamics CRM server:

    • The local IIS_WPG group
    • The local CRM_WPG group

    The domain account user must have the following local user rights:

    • Impersonate a client after authentication
    • Log on as a service

    To do this, follow these steps:

    1. On the Microsoft Dynamics CRM server, click Start, point to Administrative Tools, and then click Local Security Policy.

    2. Expand Local Policies, and then click User Rights Assignment.

    3. Right-click Impersonate a client after authentication, and then click Properties.

    4. Click Add User or Group.

      Note

      You may have to click Location to select the domain instead of the local computer.

    5. In the Group name box, type the name of the user who is running the Microsoft Dynamics CRM application pool, and then click OK two times.

    6. Repeat steps 2c through 2e for the Log on as a service right.

  3. Configure the CRMAppPool application pool security account to use a service principal name (SPN). For steps about how to configure SPNs, see Configuring service principal names (SPNs) on the Microsoft Dynamics CRM Resource Center.

  4. If you have more than one Microsoft Dynamics CRM server and IIS kernel-mode authentication is disabled, you must configure the CRMAppPool application pool security account to be trusted for delegation. To do this, follow these steps:

    1. Log on to the domain controller by using a user account that has domain administrator permissions.
    2. Start Active Directory Users and Computers. To do this, click Start, point to Administrative Tools, and then click Active Directory Users and Computers.
    3. Expand the domain, right-click the Microsoft Dynamics CRM application pool security account, and then click Properties.
    4. On the Delegation tab, click to select the Trust this user for delegation to any service (Kerberos only) option.
    5. Click OK.
  5. Restart Internet Information Services (IIS). To do this, click Start, click Run, type IISRESET, and then click OK.

Minimum required permissions for Microsoft Dynamics CRM service accounts

We strongly recommend that you select a low-privilege domain account that is dedicated to running these services and that is not used for any other purpose. Additionally, the user account used to run a Microsoft Dynamics CRM service cannot be a Microsoft Dynamics CRM user. The following are the required permissions for Microsoft Dynamics CRM service accounts.

Microsoft Dynamics CRM Sandbox Processing Service

  • Domain User membership.

  • That account must be granted the Logon as service permission in the Local Security Policy.

  • Folder read and write permission on the \Trace, by default located under \Program Files\Microsoft Dynamics CRM\Trace, and user account %AppData% folders on the local computer.

  • Read permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM subkey in the Windows Registry.

  • The service account may need an SPN for the URL used to access the Web site that is associated with it. To set the SPN for the Sandbox Processing Service account, run the following command at a command prompt on the computer where the service is running.

    SETSPN –a MSCRMSandboxService/<ComputerName> <service account>

Microsoft Dynamics CRM Asynchronous Processing Service and Microsoft Dynamics CRM Asynchronous Processing Service (maintenance) services

  • Domain User membership.
  • Performance Log Users membership.
  • That account must be granted the Logon as service permission in the Local Security Policy.
  • Folder read and write permission on the Trace folder, by default located under \Program Files\Microsoft Dynamics CRM\, and user account %AppData% folder on the local computer.
  • Read and write permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\MSCRMSandboxService subkeys in the Windows Registry.
  • The service account may need an SPN for the URL used to access the Web site that is associated with it.

Deployment Web Service (CRMDeploymentServiceAppPool Application Pool identity)

  • Domain User membership
  • That account must be granted the Logon as service permission in the Local Security Policy.
  • Local administrator group membership on the computer where the Deployment Web Service is running.
  • Local administrator group membership on the computer where SQL Server is running.
  • Sysadmin permission on the instance of SQL Server to be used for the configuration and organization databases.
  • Folder read and write permission on the Trace and CRMWeb folders, by default located under \Program Files\Microsoft Dynamics CRM\, and user account %AppData% folder on the local computer.
  • Read and write permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\MSCRMSandboxService subkeys in the Windows Registry.
  • CRM_WPG group membership. This group is used for IIS worker processes. The group is created and the membership is added during Microsoft Dynamics CRM Server Setup.
  • The service account may need an SPN for the URL used to access the Web site that is associated with it.

Application Service (CRMAppPool IIS Application Pool identity)

  • Member of the Active Directory Domain Users group.
  • Member of the Active Directory Performance Log Users group.
  • Administrators local group membership on the computer where SQL Server is running.
  • Administrators local group membership on the computer where the Microsoft Dynamics CRM Web site is installed.
  • Folder read and write permission on the Trace and CRMWeb folders, by default located under \Program Files\Microsoft Dynamics CRM\, and user account %AppData% folder on the local computer.
  • Read and write permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\MSCRMSandboxService subkeys in the Windows Registry.
  • CRM_WPG group membership. This group is used for IIS worker processes. The group is created and the membership is added during Microsoft Dynamics CRM Server Setup.
  • The service account may need an SPN for the URL used to access the Web site that is associated with it.