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

february

03feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 2 – Platform

10feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 3 – Implementation Partner

11feb11:00 am12:00 pmConfab with Stoneridge - Livestream - Live Agents, Power Virtual Agents, Omnichannel – Oh My!

16feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 4 – Cost

24feb10:00 am11:00 am5 Campaigns Manufacturing Marketers Don’t Want to Miss

25feb11:00 am12:00 pmConfab with Stoneridge - Livestream - Surfing Through the Dynamics 365 Wave 1 2021 Release

march

03mar10:00 am10:30 amThe Modern Manufacturer - MRP vs. MPS – What, When and How

03mar2:00 pm2:30 pmLot Management Best Practices for Batch Manufacturers

10mar10:00 am10:30 amEnhancing the Customer Experience and Driving More Business with Dynamics 365 Customer Service

10mar2:00 pm2:30 pmThe Five Steps to Managing Sales Tax for Manufacturers

11mar11:00 am12:00 pmConfab with Stoneridge - Livestream - Power Apps Component Framework Power Hour

17mar10:00 am10:30 amThe Modern Manufacturer: Pro Tips for your Finance Team

24mar10:00 am10:30 amUnlock the Potential of Digital Marketing with Dynamics 365 Marketing

25mar11:00 am12:00 pmConfab with Stoneridge - Livestream - The Four Keys to Choosing the Best ERP or CRM Solution

31mar10:00 am10:30 amThe Modern Manufacturer: Keys to Reporting Success

31mar01aprFinancial Reporting w/ Account Schedules for Dynamics 365 Business Central

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