Solved

Microsoft Dynamics AX user log in

Posted on 2009-07-10
10
1,648 Views
Last Modified: 2012-05-07
By default AX logs you into AX using the windows username.  Can you change AX on a server level to require a username and password?  I have a client that has floor machine that several users use at the same time and do not want to have to log out of windows every time they need to switch AX users.  Or can I make AX prompt them for a password for specific things like deleting inventory.
0
Comment
Question by:Shawnp3533
  • 5
  • 5
10 Comments
 
LVL 7

Expert Comment

by:quale-kaizen
ID: 24831442
There are several options.

One option would be to use a third-party application to log-in the users with the
appropriate credentials. I guess you can write such a program yourself.

OR

If you already have something like Citrix or Terminal Server, you can use it instead.
Without Terminal Server you can connect upto 2+1 remote desktop users.

When it comes to modifying the standard behavior of AX, yes you can do pretty much
anything you want. I can provide you with sample X++ code if you need to.

Regards,
QK
0
 
LVL 1

Author Comment

by:Shawnp3533
ID: 24833043
That would be great.  Basically I need to have the ability to have a generic login for windows and specific log-ins for AX (The computers are windows XP pro).
0
 
LVL 7

Expert Comment

by:quale-kaizen
ID: 24833126
The simplest possible solution is to force the users to log-in with remote desktop on a machine with AX client installed. This would guarantee each user would use different AD account.

Is this an option for you?

Regards,
QK
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Shawnp3533
ID: 24833220
NO Because that is would take to long to log into windows (remotely) let it come up and then log into AX.  Each time a differant User logged in.  I need to be able to have a generic Windows login and then Individual log in's for ax. We could setup the individual users in ad so AX could pull them to add them to the account but AX can't pull the log in info from the user logged into windows.
0
 
LVL 7

Expert Comment

by:quale-kaizen
ID: 24834301
The 2nd best option (in my opinion) would be to have a starter application, in order to impersonate the users trying to run AX. Here is how it works:

1) The client machine is logged in the domain as a user who has restircted  rights (or no rights at all)  in AX. The point is, users should use the strater application in order to start AX.

2) There is  a different  Active Directory user for each user trying to access AX. In AX you can use security groups to setup group permissions, so this shouldn't be a problem.

3)  The users on the client machine run the starter application, and everytime they try to run AX,  they are asked for AD username & password. In this way you can reuse the standard security framework of AX.

On the downside users should close the AX client when they finish their work (you can setup a timeout in AX as well).

The advantage of this solution is that you reuse the standard AX security framework.
And what's more, this saves you the extra time and effort to implement and maintain a parallel user authentication  & security system in AX.
0
 
LVL 1

Author Comment

by:Shawnp3533
ID: 24834360
How would I do the starter application?
0
 
LVL 7

Expert Comment

by:quale-kaizen
ID: 24834428
I can compile one for you (tomorrow).
0
 
LVL 1

Author Comment

by:Shawnp3533
ID: 24835748
Thanks look forward to it.
0
 
LVL 7

Accepted Solution

by:
quale-kaizen earned 500 total points
ID: 24841206
Now that I have AX in front of me, it turns out you don't really need the starter application:
the users can right-click on the AX icon and use the "run as..." option.
This way they can login as different users in AX without resetting their windows session.


PS:

This below is the C# source code for the AX starter application, I promissed yesterday.
For some reason I can't attach the entire project to my expert-exchange post.
If you need the entire project you can email me (see my profile) and I will send you the project.


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;
using System.Security;
using System.Diagnostics;
 
 
namespace impersonateForm
{
    public partial class ImpersonateForm : Form
    {
        public ImpersonateForm()
        {
            InitializeComponent();
        }
 
        private void buttonLogin_Click(object sender, EventArgs e)
        {
            try
            {
                String path = "ax32.exe";
                String user = textBoxUser.Text;
                String userDomain = textBoxDomain.Text;
 
                SecureString password = new SecureString();
 
                foreach (char ch in textBoxPassword.Text)
                {
                    password.AppendChar(ch);
                }
 
                System.Diagnostics.ProcessStartInfo myProcess = new ProcessStartInfo(path);
                myProcess.Domain = userDomain;
                myProcess.UserName = user;
                myProcess.Password = password;
                myProcess.UseShellExecute = false;
 
                Process.Start(myProcess);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }         
        }
 
        private void ImpersonateForm_Load(object sender, EventArgs e)
        {
            textBoxDomain.Text = System.Environment.UserDomainName;            
        }
    }

Open in new window

0
 
LVL 1

Author Comment

by:Shawnp3533
ID: 24846115
Thanks I think the run-as will work but I will also email becuase I would like to see the starter appilcation.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question