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

01sep10:00 am10:30 amEnsuring Quality and Compliance for Batch Manufacturers in Life Sciences

01sep12:00 pm12:30 pmIs it Worth It to Move to the Cloud? A Look at Considerations for Current Agribusinesses Using Dynamics GP

01sep2:00 pm2:45 pmWhat’s New in Dynamics 365 Finance and Supply Chain

09sep11:00 am12:00 pmConfab Live with Stoneridge – Data Strategy and Reporting – Mining Decision Making Insights

15sep10:00 am11:00 amSolving the Biggest Challenges in Agribusiness Through Innovation and Technology

22sep12:00 am12:30 pmSimplifying Payroll and HR Management with ADP Workforce Now

22sep10:00 am10:30 amStreamlining Batch Manufacturing with Technology

22sep2:00 pm2:30 pmProcess Automation for Microsoft Dynamics D365 for Business Central, Finance and Operations and GP

23sep11:00 am12:00 pmConfab LIVE with Stoneridge - Riding the Wave 2 Release – Key Features Coming to Dynamics 365 this October

27sep(sep 27)9:00 am15oct(oct 15)11:00 amDynamics 365 Finance & Supply Chain Development Training - Online Workshop

29sep10:00 am11:00 amTop Five Reasons Why NOW is the Right Time to Move from Salesforce to Dynamics 365 Customer Engagement

29sep12:00 pm12:45 pmUnderstanding Job Costing and Tax Management in Business Central

29sep2:00 pm3:00 pmDigitalizing Horticulture & Agriculture - How to Sell Plants Online and Simplify Business Management

30sep12:00 pm4:00 pmSecurity and Permissions Training for D365 Business Central or Dynamics NAV

october

27sep(sep 27)9:00 am15oct(oct 15)11:00 amDynamics 365 Finance & Supply Chain Development Training - Online Workshop

06oct10:00 am10:30 amPreview of D365 Business Central Fall Release Features and Functionality

06oct12:00 pm12:30 pmInsider's Guide to New Features Available in the Fall Release of D365 Finance and Supply Chain

07oct11:00 am12:00 pmConfab LIVE with Stoneridge - Dataverse and Dynamics in Review – Let’s Get Technical

21oct11:00 am12:00 pmConfab LIVE with Stoneridge - Dataverse and Dynamics in Review – Let’s Get Functional

26oct(oct 26)9:00 am28(oct 28)5:00 pmStoneridge Connect Leadership and Community Conference

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