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

june

02jun2:00 pm2:30 pmBusiness Intelligence for Batch Manufacturers

16jun10:00 am10:30 amHow AP automation can speed up month-end close in D365 Finance

17jun11:00 am12:00 pmConfab Live with Stoneridge – Real Time Marketing Strategies for Success

23jun10:00 am10:30 amThe Modern Manufacturer: Cost Accounting in D365

30jun10:00 am10:30 amAP Automation Checklist for a 2022 Rebound

30jun2:00 pm2:30 pmAchieving Success: How Technology Is Helping Nonprofits Thrive

july

01jul11:00 am12:00 pmConfab Live with Stoneridge – Dataverse Virtual Entities

14jul12:00 pm12:30 pmBeyond Reporting - What Business Intelligence Can Do For Your Agribusiness

14jul2:00 pm3:00 pmMastering the Production Floor

15jul11:00 am12:00 pmConfab Live with Stoneridge – Integration Strategies for End User Success

21jul10:00 am10:30 amThe Modern Manufacturer: Manufacturing Software in the Real World

21jul12:00 pm1:00 pmIs it Worth it to Upgrade to Dynamics 365 Finance and Supply Chain Management? - Everything AX Users Need to Consider

28jul2:00 pm2:30 pmConsiderations for Successful Testing Plans for Major Releases of Dynamics 365 Finance and Supply Chain Management

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