Wednesday, March 4, 2009

CRM 4 - Import Organization User Mapping Error

When importing an organization into CRM, you may encounter the following error message:

At least the setup user needs to be mapped before this organization can be imported

There are a few steps you may need to take to resolve this issue:

Determine the Status of Your User

The following query will tell you about the user you are attempting to import the organization with:

select systemuser.domainname, rolebase.name, roles.systemuserid, systemuser.accessmode, systemuser.setupuser
from systemuserroles roles 
inner join systemuser on roles.systemuserid = systemuser.systemuserid
inner join rolebase on rolebase.roleid = roles.roleid
where domainname = '{domain}\{username}'

Example results:

domainname   {domain}\{username}
name   System Customizer
systemuserid    {GUID}
accessmode   1
setupuser 0

'Name' should be System Administrator

Your user should have the role of System Administrator to import the organization.  Determine the correct GUID from the rolebase table for the System Administrator role, and update the systemuserroles for your systemuserid.

Accessmode and Setupuser values

Accessmode is used to specify whether the user is allowed to run the CRM setup program.  For some reason setting this to false i.e. '0' has proven to help resolve the issue.  In addition the setupuser value has to be set to true i.e. '1'.

When these values have been set, restart the Deployment Manager and import your organization!

3 comments:

  1. Where are we suppose to run this quesy? Active directry using LDAP or where?
    Thanks!

    ReplyDelete
  2. Hey, this should be run on the CRM SQL database.

    ReplyDelete
  3. Hi Jonny,
    Am trying to upgrade CRM 4.0 to CRM 2011 on premises. Everything is going fine at the end error coming up Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed.

    I tried to find solution on many blogs but nothing is working out. Can you help me on this please.

    ReplyDelete