Answered by:
Urgent problem with V4.0 Importing Organisation fails - "Setup User needs to be mapped"

Question
-
We have problems going from the Professional Trial Key to an MSDN Key. The Professional MSDN Key would not even work with uninstall and reinstall - it claimed that the existing database was not the appropriate license type!
So we did a new install with the intent of importing the organisation database. This was fine, but on mapping users, we get the following error message, which nobody on the web seems to have come across:
"At least the setup user needs to be mapped before this organization can be imported"
Please can someone advise what it actually means? Our setup user I would think is "administrator" and it is definitely mapped. Everything is mapped, but still this error message.
Thursday, April 10, 2008 11:45 AM
Answers
-
Hi.
What type of mapping are you using?
You said you re-installed CRM, did you uncheck the administrator restriction i.e. navigated to the CRM at least once and made sure the user is in unrestricted mode and has an admin role?
If I understand correctly then you should verify the following:
- You are installing / upgrading the CRM with the user who set up the CRM and that you are a domain admin.
- You exist in the CRM database systemuserbase table in the exact name and that you are related to a system administrator role.
The following sql will list all users:
select systemuserid, fullname, domainname, activedirectoryguid, isdisabled, accessmode from systemuserbase
All users except for SYSTEM and INTEGRATION are valid users.
The following sql will list the roles:
select distinct RB.Name Role ,
RB.RoleTemplateId RoleTemplate from RoleBase RB
join SystemUserRoles SUR on RB.RoleId = SUR.RoleId
join BusinessUnitBase BU on RB.BusinessUnitId = BU.BusinessUnitId
where SUR.SystemUserId = '{CRM Admin Guid}'
I think ms logs users that were not mapped successfully, so search the log file for unmapped users.
Try to find something out of the ordinary…
Hope this helps,
Adi
Saturday, April 19, 2008 1:11 AM
All replies
-
Create the same users in the organization and it should map with your current.
Regards,
Imran
http://microsoftcrm3.blogspot.com
Thursday, April 10, 2008 1:08 PMModerator -
We had a number of users in CRM (deactivated) which had disappeared from Active Directory, but we recreated them and mapped them in the import tool. This made no difference.
It appears that you don't need all the users mapped (although all existing users were automatically mapped correctly!) for this to import - as it seems to be concerned about this "Setup User"
Do you know what the "Setup User" is? We have mapped every user and still it complains.
Thursday, April 10, 2008 1:40 PM -
Dear
1. Click Start, point to All Programs, point to Microsoft Dynamics CRM, and then click Deployment Manager. 2. Right-click Organizations, and then click Import Organization.
Note If you do not have an Enterprise license key, you will be prompted to delete the organization that you created. This will not delete the SQL Server database. This will only remove the organization out of the Microsoft Dynamics CRM deployment.3. Type the SQL server name to which you restored the SQL Server database in the SQL Server box, select the organization database in the Orgnization database box, and then click Next. 4. In the Display name field and in the Name field, type the organization name, and then click Next.
Note The organization name is a unique name for the organization database. This organization name will be used in the URL to access the organization database. There is a 30 character limit for the organization name.5. In the Report Server URL box, type the URL address of the Report Server, and then click Next. 6. In the Select Method for Mapping page, select a method to map users, and then click Next. 7. As soon as all users are mapped, click Next. 8. Click Next after the system requirements checks are completed. 9. Click Import to start the Import Organization Wizard.
https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;949972
Regards,
Imran
http://microsoftcrm3.blogspot.com
Friday, April 11, 2008 1:04 PMModerator -
I beg of you, please understand that we are following these steps precisely. We know how this SHOULD work, but as specifically noted twice, step 7 is not working.
All users are mapped and exist, yet the error message as specified in the original post is still occuring, indicating that the "Setup User" is not mapped.
We do not know what this Setup User is supposed to be and why it is not mapped.
The question is simply - What is the Setup User and what could cause the error message. Can anyone advise?
Sunday, April 13, 2008 11:24 AM -
The Setup User is the active directory user account that was used to install CRM. This user will have to exist (and also be enable, I believe) in the organization database, and will have to be mapped to a valid active directory user account
Sunday, April 13, 2008 3:03 PMModerator -
Thanks - the problem is that the setup user is the administrator account, and this is very clearly mapped to the CRM user administrator. Is there something in the database we can check to see what it thinks is this setup user?
Perhaps it is confused?
Monday, April 14, 2008 12:10 AM -
I am also getting exactly the same issue. I tired manually mapping the users and automatically, both give the same result.. I’m at a loss.
Friday, April 18, 2008 10:22 PM -
Hi.
What type of mapping are you using?
You said you re-installed CRM, did you uncheck the administrator restriction i.e. navigated to the CRM at least once and made sure the user is in unrestricted mode and has an admin role?
If I understand correctly then you should verify the following:
- You are installing / upgrading the CRM with the user who set up the CRM and that you are a domain admin.
- You exist in the CRM database systemuserbase table in the exact name and that you are related to a system administrator role.
The following sql will list all users:
select systemuserid, fullname, domainname, activedirectoryguid, isdisabled, accessmode from systemuserbase
All users except for SYSTEM and INTEGRATION are valid users.
The following sql will list the roles:
select distinct RB.Name Role ,
RB.RoleTemplateId RoleTemplate from RoleBase RB
join SystemUserRoles SUR on RB.RoleId = SUR.RoleId
join BusinessUnitBase BU on RB.BusinessUnitId = BU.BusinessUnitId
where SUR.SystemUserId = '{CRM Admin Guid}'
I think ms logs users that were not mapped successfully, so search the log file for unmapped users.
Try to find something out of the ordinary…
Hope this helps,
Adi
Saturday, April 19, 2008 1:11 AM -
Hi
I have exactly the same problem: when paaing the users, the wizard says "setup user needs tpo be mapped".
I tried all options user mapping and none of them works. when auto mapping users i receive an error "there was an error during the Users mapping." but no further information.
i also checked the event viewever but did not find any entries there.
Any help is very welcome
Claudio
Monday, May 5, 2008 7:33 AM -
Hi all,
Forgot to mention we found the solution - after 3 days of working with Microsoft Support, it was trivial!!
We had de-activated the Admin user (to save users) prior to doing the import, and the import requires the Admin user to be active. Since you can't do it with the GUI, we used something like the following script to activate the Admin/System User:
use <ORG_TO_BE_IMPORTED_MSCRM>
go
update SystemUser set IsDisabled = 0 where DomainName = '<DOMAIN>\<USER>'
go
- Proposed as answer by PatrickCactus Thursday, March 14, 2013 1:57 PM
Monday, May 5, 2008 8:14 AM -
hi
Thanks for sharing your solution, is it possible that you meant "SystemUserBase" instead of SystemUser.
However the solution did not work out for me, i set all user to isDisabled=false, and still get the same error.
do you have any idea why?
cheers
Claudio
Tuesday, May 6, 2008 1:42 PM -
I still cannot import the database, i also tried to manually map the administrator account in the systemuserbase table, still without success.
Does anyone else experience the same?
thanks, claudio
Friday, May 16, 2008 11:01 AM -
Constant dripping wears away the stone...
I am not fully sure if i caused more problems with this solution, however the database is importing now:
The Systemuserbase table contains a field "Accessmode", It was one of the differences between the Setup user record and the other records so i switched it fro 1 to 0, just as the other records.
after that, running the wizard did not show the Setup user problem, and continued (it's now currently importing, i'm crossing fingers that it works).
HOWEVER: I checked the SDK and the AccessMode = 1 means "Access to Run Setup", which i now set to Full Access.
I hope this helps other people as well. but does someone has experience with the consequences of setting this field?
Cheers
Claudio
Tuesday, May 20, 2008 7:09 AM -
I got this message as well.
Simple solution really --> Make sure the user who installed CRM on the original deployment you are importing, is mapped to the install user of v4 on the current machine. Makes sense, and the install users should simply be that, install users, so record ownership should not be an issue if proper planning is followed.
Hope this helps...
Wednesday, August 6, 2008 3:07 PM -
I fixed this by opening the 'SytemUserBase' table and finding my user and scrolling to the right to find the colomn of "SetupUser" and set it to true
DONE!Monday, September 15, 2008 2:01 PM -
- Proposed as answer by Miss_H Wednesday, May 13, 2009 9:13 AM
Tuesday, October 14, 2008 6:43 PM -
I bumped into this problem when trying to change the name on our organisations CRM database. We used the domain administrator account to install CRM but then trying to match that user during the import we got the same error message. This is what I did to solve the problem for us:
I used SQL Management Studio to open the SystemUserBase table in the organisations database.
I then changed the value of column "isDisabled" to false and the value of column "SetupUser" to true for the administrator.
Good luck and I hope this helps.
Wednesday, October 22, 2008 5:30 PM -
Do the various permissions etc discussed above apply to both the CRM setup accounts, ie the account used to set up CRM in the imported organisation and in the new install? Do the two accounts need to have the same login name and / or the same domain name and or the same email address?
I was getting this error while importing a database that had been originally from a CRM installed by crmadmin and I was installing into a CRM instance created by administrator. I thought that I had worked through and tried all of the various changes at in the systemuserbase table for both the active deployment and the imported database.
If somebody could give a definitive set of steps, which clearly demark the source database and and the destination database this would be greatly appreciated by me, and I'm sure by other users.
Thanks
Gill
Sundis wrote: I bumped into this problem when trying to change the name on our organisations CRM database. We used the domain administrator account to install CRM but then trying to match that user during the import we got the same error message. This is what I did to solve the problem for us:
I used SQL Management Studio to open the SystemUserBase table in the organisations database.
I then changed the value of column "isDisabled" to false and the value of column "SetupUser" to true for the administrator.
Good luck and I hope this helps.
Tuesday, December 2, 2008 10:41 AM -
Just an add on to this post, I had to redeploy a database where the setupuser records were all set to 0 (ie. there was no setup user).
No idea of the consequences, but updated the administrator to 1 and the import succeeded.
HIH,
KarloThursday, January 15, 2009 2:30 PM -
I had loads of problems with this. The following worked for me:
On the organisation database which you are trying to import:
Update SystemUserBase
Set SetupUser = 0, AccessMode = 0
Where DomainUser <> 'the user you want'
Update SystemUserBase
Set SetupUser = 1, AccessMode = 1
Where DomainUser = 'the user you want'
I used our admin user for the purpose, which is the user I had used to install the initial crm install on the machine I am trying to import to.
Once I had done the above I made sure that the "selected" user existed in the existing empty database and also made sure the settings where the same.
Ran the import thing and it worked. I banged my head against the wall for a while with this one.
One this I found strange is that there where a lot of users with AccessMode = 1 and as far as the SDK it stated these are users who can run setup?! Wierd.
Hope this helps.
DaveMonday, March 16, 2009 10:56 AM -
it seems that the setup user mentioned in this error is not related to the SetupUser field in SystemUserBase table.
normally we use domain administrator account to install the crm server and then the crm admin account is mapping to administrator.
if you import a org db to another environment that the AD account for crm server admin is not administrator, you have to map the crm admin to this account, rather to let it auto-map to the administrator account.
I just got the same problem and since my currently logged-in account is named crm_admin, which is used for crm system, I mapped the crm admin to this ad account, and just passed the error and go to next step.
FYI.
RexThursday, March 19, 2009 12:24 PM -
Hey guys,
Just uninstall the crm from your workstation
and start the installation just like you install a new crm
and just keep on your installation without downloading the updates
I know it is irritating but it is how I solved the same problemMonday, June 8, 2009 12:00 AM -
This worked for me!
Thanks KenMonday, November 9, 2009 8:14 PM -
This thread is great and without it I would not of solved my issue. I had to add the CRM system administrator role as well to my user.Based on the info here, I've updated a script to sort the issue out, just copy and paste the new setup user into the SET @NewSetupUserDomainName ='' below.HTHSi
--Listing Users and with their roles SELECT SU.DomainName ,SU.SetupUser ,SU.IsDisabled ,SU.AccessMode ,SUR.SystemUserId ,RB.Name [Role] ,SUR.RoleId FROM RoleBase RB INNER JOIN SystemUserRoles SUR on RB.RoleId = SUR.RoleId INNER JOIN SystemUser SU ON SU.SystemUserId = SUR.SystemUserId --WHERE RB.Name = 'System Administrator' ORDER BY -- Sort SysAdmins to the top CASE RB.Name WHEN 'System Administrator' THEN '!' ELSE RB.Name END, DomainName DECLARE @NewSetupUserDomainName NVARCHAR(255), @NewSetupUserId UniqueIdentifier, @SystemAdminRoleId UniqueIdentifier --I've not tested this selecting a setup user that does not belong to the root business unit. SET @NewSetupUserDomainName = 'CRM\Administrator' SELECT @NewSetupUserId=SystemUserId FROM SystemUser WHERE DomainName=@NewSetupUserDomainName IF (@NewSetupUserId IS NULL) RAISERROR (N'Unable to find user %s.', 18, -- Severity, 1, -- State, @NewSetupUserDomainName); ELSE BEGIN SELECT @SystemAdminRoleId=RoleID FROM SystemUser U INNER JOIN [Role] R ON R.BusinessUnitId=U.BusinessUnitId WHERE R.Name = 'System Administrator' --remove all setup user(s) UPDATE SystemUser SET SetupUser = 0 --Mark our user as the setup user UPDATE SystemUser SET SetupUser =1 ,IsDisabled =0 ,AccessMode =0 WHERE SystemUserID = @NewSetupUserId --Make sure that user has the system admin role IF (NOT EXISTS(SELECT * FROM SystemUserRoles WHERE SystemUserId=@NewSetupUserId AND RoleId=@SystemAdminRoleId)) BEGIN INSERT SystemUserRoles (SystemUserRoleId,SystemUserId,RoleId) SELECT NEWID() ,@NewSetupUserId ,@SystemAdminRoleId PRINT 'Added CRM Sys Admin role to user' END END
@_Simon_Jackson http://www.simonjackson.info/ MBCS MCBMSS MCBMSP MCSD MCDBA MCAD MCSA- Edited by _Simon_Jackson Friday, March 12, 2010 9:15 PM type
- Proposed as answer by Scott.B Thursday, September 16, 2010 5:55 AM
Friday, March 12, 2010 4:58 PM -
For anyone struggling with this I found a very easy solution.
Step 1A) If you started an import and it is erroring out CLOSE the import wizard. Now start the process below:
Step 1) From your orignal CRM Server (or whatever server SQL is installed on) Right click on your namexXX_MSCRM database and choose properties. ON the General TAB it will tell you WHO the owner is. Write down the Account name doman\user
Step 2) On the new sql server or new SQL DB open a query window and run:
Select
accessmode,setupuser,firstname,lastname,isdisabled from systemuserbase order by lastname asc
Find the user account you wrote down from step 1. ***Is the account disabled? (it would be set to a 1 if it is)
Step 3) Run a sql update command to enable the account.
example:
Update
systemuserbase set isdisabled='0' where firstname='John' and lastname='Doe'
***be sure you are selecting your user, not my example***
Step 4) Start your import as normal. When you get an error about the Mapping find your user from step 1. Map that account to the Windows account that was used to install CRM probably Administrator.
- Proposed as answer by ntschultz Friday, March 26, 2010 10:27 PM
Friday, March 26, 2010 10:26 PM -
For anyone struggling with this I found a very easy solution.
Step 1A) If you started an import and it is erroring out CLOSE the import wizard. Now start the process below:
Step 1) From your orignal CRM Server (or whatever server SQL is installed on) Right click on your namexXX_MSCRM database and choose properties. ON the General TAB it will tell you WHO the owner is. Write down the Account name doman\user
Step 2) On the new sql server or new SQL DB open a query window and run:
Select
accessmode,setupuser,firstname,lastname,isdisabled from systemuserbase order by lastname asc
Find the user account you wrote down from step 1. ***Is the account disabled? (it would be set to a 1 if it is)
Step 3) Run a sql update command to enable the account.
example:
Update
systemuserbase set isdisabled='0' where firstname='John' and lastname='Doe'
***be sure you are selecting your user, not my example***
Step 4) Start your import as normal. When you get an error about the Mapping find your user from step 1. Map that account to the Windows account that was used to install CRM probably Administrator.
- Proposed as answer by ntschultz Friday, March 26, 2010 10:27 PM
Friday, March 26, 2010 10:27 PM -
I have eperiances the same issue when importing old organisation to a new deployment "At least the setup user needs to be mapped before this organization can be imported". I am hoping that atleast one of your suggestions will work.
Wish me luck
Wednesday, September 29, 2010 9:35 AM -
He averyone
I resolved this issue buy doing the follwing
1. followed the steps on this areticle from 1-8.
2. un-installed the sql connector
3. reboot the the sql server
4. re-installed the sql coonnector
5. reboot the sql server
6. Install rolups on the sql server and the new crm server. Make sure that you instll all rollups (Server and SSRS) that were installed on the old diployment to the new deployment before importing the old organisations to the new deployment ortherwise you we get the error message "substantioal difference between the two deployments"
7. After installing all the rollups reboot both servers : CRM and the SQL server
8. Then import the old organisation. If you have more than one org to import make sure that you restart both server after evry sucessful org import, otherwise you will get SSRS issues.
I did not have reinstall nor re-configure my email router, everthing just worked perfectly is I used the exact org name and display name
Hop this works for you
Ta :)
Monday, October 11, 2010 8:21 AM -
This solved my issues with the broken account I was trying to use. Kudos Simon!
Rowland Gosling, DBAFriday, October 22, 2010 2:07 PM -
i had your problem also. setting accessmode to 0 solved the issiue. not sure but think 1 is admin only not full accessThursday, October 27, 2011 2:01 PM
-
Dear Imran,
I am using Window Server Standard. then I can make more than one organization in Deployment Manager?
Thanks & Regards,
Vivek Gupta
Wednesday, June 20, 2012 6:40 AM