Wednesday, July 19, 2006

Dynamics AX and ADSI

     I've been using ADSI for a while during my work as a system administrator and I realy adore it but AX does lack Active Directory access facilities. There is only one built-in tool (as far as I know) to access AD from AX - that is ADObject class. But all it can do is find a user in the default domain and get some properties of it. To be precise it finds AD objects in the GetObject("LDAP://rootDSE").get("defaultNamingContext") using filter "(&(objectClass=user)(objectCategory=person)(sAMAccountName=%s))". AX supports COM objects (via IDispatch interface only), but if you try somehow to get an instance of IADs object you'll get an error so we should figure out how to get an IADs instance for a given LDAP path...      Unfortunately it looks like there is no way to do this whithout an external tool. I'm planning to write a small COM object that will make possible for an AX application to get instances of ADSI objects for a given LDAP path. Later I'll tell what I managed to do...

1 comment:

Max Belugin said...

Com::getObjectEx