Monday, December 16, 2013

SID of user from active directory / AD

    AX 2012 stores user information in the UserInfo table . While creating a new user manually/sql server, we need to specify the SID of the user. The following X++ code fetches the SID of the user from AD/ registry.

    To get SID of user, without this user will not be able to login to ax, just user will be shown into user form

    xAxaptaUserManager Axmanage;

    Axdetails = Axmanage.getSIDFromName(this.UserId,this.NetworkDomain,UserAccountType::ADUser);

1 comment:

  1. Hi Nishant,

    Thanks for the post. This works great when creating a user for a single domain. But when you try to create a user from another domain, it gives an error. So, I went and I had a look at how the user import works, and there they use the following:

    Axmanage.getUserSid(this.UserId, this.NetworkDomain);

    Regards,
    Dyls

    ReplyDelete