SBX - Search With Button

SBX - Forum Post Title

Failed to create a session$ confirm that the user has the proper privileges

Microsoft Dynamics AX Forum

Marian Fahim asked a question on 26 Jan 2011 2:34 AM
My Badges

Question Status

Suggested Answer

while applying changed based alert in ax4 the below error appeared to me , is there any recommendations to solve this error

thanks

Reply
Patrik responded on 27 Oct 2011 12:43 AM

We just got the same problem, did you find any solution to this problem?

Reply
John Castro responded on 5 Dec 2011 9:46 AM
My Badges

Just got the same error after installing Cumulative 1 for AX 2012, any ideas?

Reply
John Castro responded on 5 Dec 2011 10:53 AM
My Badges
Suggested Answer

Wanted to share how we resolved the error "Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics.”

Found that this is often cause in AX 2012 by concurrently compiling the CIL, normally it goes away after the compile is done but sometimes the error won't go away. Resolved this by restarting the AOS on the server. Also heard the restarting client once the CIL is complete will work.

Reply
Nicholas Buhaets responded on 1 Feb 2012 4:41 PM

Here's something new to think about.

We run the change based alerts batch job every 5 minutes daily.

On 30/01/2012 it ran in total 288 times, 10 of these failed (status Error).

Full infolog output:

Infolog for Job Change based alerts (5637243922)

Infolog for Task Change based alerts processing task (5637187592)

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

Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.

  at Microsoft.Dynamics.Ax.MSIL.Interop.createRunAsSession(String userId, String company, String language)

  at Microsoft.Dynamics.Ax.Xpp.PredefinedFunctions.runas(String userId, Int32 classId, String staticMethodName, Object[] parms, String company, String language)

  at Dynamics.Ax.Application.EventJobCUDTask.Run() in EventJobCUDTask.run.xpp:line 24

  at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 50

  at BatchRun::runJobStatic(Object[] )

  at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)

  at BatchIL.taskThreadEntry(Object threadArg)

We have just started the AOS (during production hours, it's a stretch to take the system out of operation to do a CIL compile).

Since the restart the job has run 6 times with success and failed once.

Note that we did a full compile (Admin > Periodic > Compile Application), CIL compile, and AOS reset last week and this batch job was still failing (3% of the time on 31/01/2012).

Reply
Rola Halabi responded on 8 Jan 2013 3:11 PM

Hello Nik,

Any solutions found to ur changed based alerts problem? i have the same problem and can't seem to find any answers!

Reply
Justin Barber responded on 25 Jan 2013 10:26 AM

Delete the rows out of the EventCUD table.  you will lose some alerts but this should kick off the job.  Disabled users or Users whose security permissions have been lowered after they originally setup an alert rule will not be able to have there alerts run which stops the job.

Reply
Zachary James responded on 11 Jul 2013 5:18 AM
My Badges

I am encountering this same issue. I have completed a full compile, CIL compile, Intermediate CIL, and I still cannot get passed the error "Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics.” I had found information about going to Tools > Options > Development > and uncheck “Execute business operations in CIL”. All of these tasks have not allowed me to resolve this error. I have the proper roles in SQL for the business and model database as well....any other tips?

Reply
Trung Nguyen responded on 11 Jul 2013 8:53 PM
My Badges
Suggested Answer

Hi Zachary,

I follow this link www.ksaelen.be/.../ax2012-r2-db-sync-failed-to-create-a-session and the issue has been gone.

Hope help you.

BR,

Trung

Reply
Vavani responded on 3 Dec 2013 10:12 AM

During my installation of CU6 on AX 2012 R2, I am encountering the same issue at data upgrade step."Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics." ..I tried all the suggested steps in this blog and in few other blogs...can anybody be more specific - how they resolve this issue. I would say, MS really did a very poor job in this regards. There is not enough materials and look like they have not tested their hot-fixes and CUs before release. :(  

Reply
Zachary James responded on 3 Dec 2013 10:59 AM
My Badges

I also found that when I disabled all users and ran the CIL, I would receive the error. But If I went back in and went to "online users" and enable all, then ran the CIL, It would come back without the user session error....

Reply
Vavani responded on 3 Dec 2013 4:00 PM

Hi Zach

Anything is better than nothing.....we don't have any online users at this time except the admin. We only few users at this time...that's all. Have you ever able to installed CU6 successfully?

Reply
Vavani responded on 4 Dec 2013 11:02 AM

Thanks everybody. Finally, after three painful weeks, I could able to install CU6 in my AX 2012 R2 environment.

I was stuck at this point -- "Failed to create Session, Confirm that the User has the proper privilege to log on to Microsoft Dynamics"

Here are few things -- I did...

Make sure - permission are given to each partition. DatabaseMicrosoftDynamicsAX Table: USERINFO . (Please see highlighted rows.I have hide few cols just to accommodate the image here.)

I use axadmin user to install the CU6 and run all the steps as mention in the Software Upgrade Checklist.  Also I have given database permission as shown below

SQL Server Management Studio-->After connecting SQL Server--Expan Security Tab-->Right click on the user and make sure permission as given appropriately. See the screen shot below

I ran the Synchronize database again....it PASS 

Ran Launch data upgrade---wait for whole night ---Morning  got error as Cockpit below -bummer....

This time -- Ran the Synchronize database again --> PASSth is time again

Ran Launch data upgrade Again--Reload the scripts again . This time ran all the launch data upgrade successfully

Hope my this experience will help others who are facing this issue. If anybody needs specific answers, you can reach me at microsoftblue@gmail.com

Reply
Vavani responded on 4 Dec 2013 11:10 AM
Suggested Answer

Failed to create Session, Confirm that the User has the proper privilege to log on to Microsoft Dynamics

One more thing I noticed during this process, - the Cockpit is kind of confusing. Look like it is hanging or not doing anything...but NOT. It is running in the background and it takes time. So, need good patience....

Reply
Ian Schofield responded on 17 Dec 2013 11:35 PM
My Badges

Reviewing the above there are various source of reasons for causing this error. I've not seen this simple one - network communications failure.

Reply
Zachary James responded on 18 Mar 2014 6:43 PM
My Badges

I am having this issue again when I sync....I have taken all the steps we have discussed through these threads...Anything new to CU7 that could cause this?

Reply
John Castro responded on 5 Dec 2011 10:53 AM
My Badges
Suggested Answer

Wanted to share how we resolved the error "Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics.”

Found that this is often cause in AX 2012 by concurrently compiling the CIL, normally it goes away after the compile is done but sometimes the error won't go away. Resolved this by restarting the AOS on the server. Also heard the restarting client once the CIL is complete will work.

Reply
Trung Nguyen responded on 11 Jul 2013 8:53 PM
My Badges
Suggested Answer

Hi Zachary,

I follow this link www.ksaelen.be/.../ax2012-r2-db-sync-failed-to-create-a-session and the issue has been gone.

Hope help you.

BR,

Trung

Reply
Vavani responded on 4 Dec 2013 11:10 AM
Suggested Answer

Failed to create Session, Confirm that the User has the proper privilege to log on to Microsoft Dynamics

One more thing I noticed during this process, - the Cockpit is kind of confusing. Look like it is hanging or not doing anything...but NOT. It is running in the background and it takes time. So, need good patience....

Reply
absolute584 responded on 2 Dec 2014 2:28 PM
Suggested Answer

Get your last few deleted user accounts and check if they exist in the EVENTCUD (alerts) table. If so, delete the records for that user only. This should fix it as it did for me.

Reply

SBX - Two Col Forum

SBX - Migrated JS