Using ADSI Across Domains

Posted on 2006-03-22
Last Modified: 2010-08-05


I think I'm chasing my tail here and wanted some clarification.

I have a web program that needs to get information about the user from AD. I get the users DN and pass it to functions like:

Function ADUserData(strDN)

Set objADSI = GetObject("LDAP://" & strDN)
Session("Username") = objADSI.DisplayName
Set objADSI = Nothing

I have created all my AD functions into a ActiveX DLL and published as a com + object, running under a user account for its identity.

It is my understanding that all the functions called from this dll will be executed under the user context.

All works fine for users in the same domain. However when a user from a different domain visits the site, get the following error:

error 80005000 automation error

The account that the dll is running under is a domain admin has been granted rights in the other domain. If I put this function into a vbscript it works fine when run by the same user that is the identity of the DLL. What gives?

Question by:mooka

    Author Comment



    wasnt security, just bad error logging. I was getting the objADSI.Manager attribute when there wasn't any.

    Accepted Solution

    Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now