I have recently imported Contoso Demo Data using Data Transfer Tool on a brand new CU8 environment and it was required to upgrade it to CU12.
All the previous steps were fine, installation, data importation and CU12 installation (Application and Binary) worked without problems. Then I started the Upgrade Check List, since this was an environment free of customizations I had no problems with Code Upgrade and jumped to Data Upgrade:
Problem started on Launch data upgrade step, when I opened the cockpit and clicked on Run I would get the message error “Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics”.

Reading some forums and blogs I tried the following troubleshootings:
– Restarted AOS;
– Checked if Admin and AOS account had database privileges;
– Compiled using AXBuild;
– Compiled IL;
– Deleted UAC files;
– Deleted XppIL folder;
– Deleted and recreated partitions.
Observation: If you need more details about these steps, check this post from StoneRidge.
Then I read a post by Joris de Gruyter saying that the reason is because the cockpit runs in CIL and there’s a handoff between client and server using “RunAs”, and that goes through the admin account. If the admin account is invalid, the RunAs fails.
I believe the reason for recreating partitions is because when you import the Demo Data using Data Transfer Tool some system tables are left untouched, including UserInfo table, and the cockpit needs an Admin account for each partition to use on “RunAs”.
The Demo Data consists of three partitions, Initial (default), Public Sector and Extended, for some reason when I deleted the partitions and created again, it didn’t create an Admin account for every new partition.

My solution was to create an Admin account for each partition through Job.
static void CreateUserAdmin(Args _args)
{
UserInfo userInfo;
select userInfo where userInfo.id == 'Admin';
userInfo.(fieldNum(UserInfo, Partition)) = 5637144578;
userInfo.insert();
}
This job selects a record from UserInfo with ID equals to Admin and then it modifies the field partition to a manual value, that’s why I had to use “(fieldNum(UserInfo, Partition))”, otherwise AX won’t let me assign a value manually.
Checking records through SQL Management Studio again:

I restarted AOS(just to be sure) and tried to run Upgrade Cockpit again, for my hapiness it started working 


Like
Report
*This post is locked for comments