Getting Failed to create a session message at Synchronize


Long has been since I started to see this error message when doing a Full Data Dictionary synchronize: "Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics.". I tried the solution of setting the SID of my user for the rest of the Admin records created in other partitions, however, this didn't provide the solution all the times.

Couple days ago, out of the blue (just deleted 3 models from AX), I experienced the error again. This time I tried to throw a little more time to it and managed to solve it by doing the following (no database restore or wiping data was required):

1. Once you get your error, first STOP the AOS;
2. Restart the AOS and START the Partition initialization checklist from the Administration module; just go through the first four steps (on the 3rd - Create legal entities there is no need to do anything, just close the form);
3. Once complete, close the Checklist form and STOP the AOS;
4. From Microsoft Dynamics AX PowerShell management do a Set-AxModelStore -NoInstallMode (this was required in my case since I just deleted several models);
5. Check the status of the records in your UserInfo table; look to see if you have records from other partitions different than the 'Initial' one; if you do (in my case I didn't have any) I would think it's alright to delete them (make sure you have a backup of the records - AND never do this in other environments than the DEV or maybe TEST); and at the end of this step you should only have one Admin record in the 'Initial' partition; alright, if you need the other partitions, maybe you will have to recreate the records again, after the sync process works.

Sync should work now (it worked in my case and I've finally been able to quantify the steps).

No comments:

Post a Comment