Adding User Role Runtime...

How To Add User Role at Run time in Ax 2012 and removing The same once my operation over.

I got  a idea from security Util class where i can give SYSADMIN previledges runtime.

But issue is When i will restart my client then only it will apply.


But as i said earlier.I need to do it in Runtime..

So let me know if anybody has any idea regarding same..




  • Changing the security context, without creating a new workspace is not possible.
    You can look into opening a new workspace from code (CRTL + W)
    or you can look into running the specific piece of code in a RunAs block. :)
  • Why are you trying to do that?