Active directory in dynamics ax

Description:-
Introduction to Active Directory:-

Active Directory is a directory service used to store information about the network resources across a domain.

An Active Directory (AD) structure is a hierarchical framework of objects. The objects fall into three broad categories: resources (e.g. printers), services (e.g. e-mail) and users (accounts, or users and groups). The AD provides information on the objects, organizes the objects, controls access and sets security.

Each object represents a single entity — whether a user, a computer, a printer, or a group — and its attributes. Certain objects can also be containers of other objects. An object is uniquely identified by its name and has a set of attributes — the characteristics and information that the object can contain — defined by a schema, which also determines the kind of objects that can be stored in the AD. Active Directory is an implementation of LDAPdirectory services by Microsoft for use primarily in Windows environments. The main purpose of Active Directory is to provide central authentication and authorization services for Windows based computers.

Axapta 4.0 uses AD for the users. It checks for the user crendentials and the domain from the AD.

Important Classes for AD :ADObject, xAxaptauserManager, xAxaptaUserdetails

Here is the small example to get the user information from the AD.
Copy the job and run the job by passing valid network alias.  https://i1.wp.com/shared.live.com/VIf%21VWmJbs6tK-ObyYk28Q/emoticons/smile_angel.gif

static void ActiveDirectory_example(Args _args)
{
    AdObjectadUser = newAdObject("umesh.adroja");
    str firstName;
    str middleName;
    str mail;
    #define.givenName('givenName')
    #define.middleName('middleName')
    #define.mail('mail')
    ;
    if(!adUser)
    {
        checkFailed("Active dirtectory integration not available or OS account of the alias provided is incorrect");
    }
    else if( adUser.found() )
    {
        firstName     = adUser.getValue(#givenName);
        middleName    = adUser.getValue(#middleName);
        mail          = adUser.getValue(#mail);
        printfirstname;
        printmiddlename;
        print mail;
        pause;
    }
}

Related Posts

Previous
Next Post »

Thanks for comments.....