5 Tips to Resolve the AX Error: ‘Failed to create a session; confirm that the user has the proper privileges….’

by | Updated August 15, 2016 | Dynamics AX, User Tips and Tricks

Many times over the years, I’ve run into the following AX error:

“Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics”

So I decided to compile a few of the primary reasons why you can get this error upon sync and the #1 reason for me was originally the hardest to figure out and the one I repetitively run into when I have a new environment setup for me.  So, here we go!

Option 1: Partitions

If someone has setup a new environment for you and imported the demo data using the “Test Data Transfer Tool” you can run into this error upon sync.  The reason you get this error is that there are 3 partitions:   Ext, Initial and PS and userInfo was only given to the initial partition.  What you need to do to resolve this issue is:

a. First in SQL review the userinfo table and checkout how many times you see the Admin ID in the table:  select * from userinfo where id = ‘admin’

b. I’m guessing you only see the admin record one time and this would be the problem.  When you have multiple partitions you should see the record in there for as many partitions as you have.  So, in our instance there should be 3 admin records in the userinfo table.

c. In SQL I usually run this command:  delete PARTITIONS where PARTITIONKEY in (‘ext’, ‘ps’)

d. Next open the AX client and navigate to:  System Administration > Setup > Partitions.

e. You should only see one partition called “Initial”.  We need to recreate the two we delete via our SQL script.  So create two new partitions called:  Ext and PS as seen below.

Partitions

f. Go review the userinfo table in SQL you should see that two new records have been automatically added for the administrator account.

g. Now try to sync the database in AX and you should have success!

Option 2: Run Business Logic

The second thing you can try which occasionally works is to run the business logic not using IL.  You can disable this by:

a. In the AX client navigate to:  File > Tools > Options > Development hyperlink.

b. Unmark “Execute Business Operations in CIL”.

c.  Close the AX app and restart your AOS.

d. Open AX and try to Sync.

Option 3. Run a Full CIL.

a. To do this restart your AOS 1st and then from the AX Development Environment go to:

i. Build > Generate Full CIL.

Generate Full CIL in AX 2012

b. Now try to Sync.

Option 4: Delete your AUC Files.

NOTE:  The AUC file is a cache of objects from the AOT.

a. Close out of AX.

b. Navigate to one of the following:

i. Windows XP and Windows 2003

C:\Documents and Settings\%username%\Local Settings\Application Data

ii. Windows Vista, Windows 7 and Windows 2008

C:\Users\%username%\AppData\Local

c. Delete the file or files with the extension .auc.

d. Open AX and try to Sync.

Option 5: Improper Privileges

The user actually doesn’t have the proper privileges in SQL to run a sync which means they aren’t in the db.reader and db.datawrite roles.  You can review this blog to check your SQL User Mapping.

 

Related Posts

5 Comments

  1. Tom

    I ran into this error again and it was via workflow. We found that an Active Directory account that was for one of the approvers in the workflow had been removed. We had to remove the user from the workflow, recall and resubmit the workflow to get past the error message.

  2. albert

    If this is an error generated from a Workflow, this may be due to your work flow is using ParticipantProvider service. You may check with your Active Directory of this particular user and check Organization tab > Check Manager field if there is a domain user specified. If not, then you need to specify one.

  3. Klaas

    Thanks Tom, that saved me a lot of time. Option 1 did it for me.

  4. Brandon Carmichael

    Hello Klaas,

    I am glad to hear Option 1, from Tom’s blog article “5 Tips to Resolve the AX Error”, was able to help you out. Thank you for taking to the time to show your appreciation.

    Cheers,
    Brandon

  5. Roland Ribi

    There is a additional Option to solve this: if you have a workflow which uses workflow Queues and there are users assigend to this Queue who arn’t active anymore, it is also possbile to run in to this error.

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

september

02sep10:00 am10:30 amThe Modern Manufacturer - Cycle Count Management

02sep12:00 pm12:30 pmBest Practices for Work Order Planning and Routing for Field Service Companies

09sep10:00 am11:00 amWhat is Levridge? An Overview of the Ultimate Ag Solution

09sep12:00 pm12:30 pmOverview of Microsoft Promotion for NAV and GP Clients

10sep11:00 am12:00 pmConfab with Stoneridge - Livestream - Field Service Comparisons

16sep10:00 am10:30 amThe Modern Manufacturer - Product Lifecycle Management

16sep12:00 pm12:30 pmHow to Upgrade to Dynamics 365 Finance and Operations: Examining Custom Code and ISV Implications

16sep2:00 pm2:30 pmScheduling and Dispatching for the Modern Field Service Company

23sep12:00 pm1:00 pmDynamics 365 Business Central Wave 2 Release Preview - An Overview of the Most Exciting New Features Coming in October

24sep11:00 am12:00 pmConfab with Stoneridge - Livestream - The Modern Workplace: Teams, Sharepoint, Outlook, Office, and AI Integration

30sep10:00 am10:30 amThe Modern Manufacturer - Return Management

30sep12:00 pm12:30 pmEmpowering Your Field Service Technicians with a Mobile Solution

october

07oct12:00 pm1:00 pmThe Three Paths to Business Central from Dynamics GP

08oct11:00 am12:00 pmConfab with Stoneridge - Livestream - The Vision and Strategy of Microsoft Business Systems

14oct10:00 am10:30 amThe Modern Manufacturer - Complex Cost Modeling

14oct12:00 pm12:30 pmGenerating Custom Inspection or Process Forms

19octAll Day22Stoneridge Connect Fall 2020

22oct11:00 am12:00 pmConfab with Stoneridge - Livestream - Stoneridge Connect Recap

28oct10:00 am10:30 amThe Modern Manufacturer - Engineering Change Orders

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X