ADSI-->LDAP access to Global Address List question

ADSI-->LDAP access to Global Address List question

Post by Brad Kimbal » Wed, 11 Feb 1998 04:00:00



I am trying to remotely modify some user properties in a global address list
using an ADSI interface to LDAP.  My program is written in VB 5.0 (SP3).  I
am getting an "automation error" when I execute "oADS.OpenDSObject(...)"
after setting oADS = GetObject("LDAP:").  I installed the ADSI client on my
machine (running Win 95) and LDAP seems to be running on the server.

1.  Are there any specific settings or DLLs on either my machine or the
server that might be related to LDAP or ADSI that I have overlooked.
Possibly "anonymous" authentication for LDAP?

2.  Will this method, assuming it works, access both the Exchange 5.0 and
5.5 versions of the global address list?

3.  Does X.500 need to be installed?  We are using X.400 currently.

thanks,

Brad

 
 
 

ADSI-->LDAP access to Global Address List question

Post by Brad Kimbal » Thu, 12 Feb 1998 04:00:00


As an addendum, I downloaded the ASDI sdk and still cannot use NDS or LDAP
to connect to our domain server.  I haven't had a lot of luck using the code
snippets I have found on the net, but I was wondering if there is an "ASDI
service" that I have to install on our server, or is having LDAP running
sufficient?

Also, our X.400 connect strings don't look much like the examples I have
seen and I wonder if ASDI is able to decode them.  For example:
"LDAP://MyServer/g=Test,s=User,o=MyOrg,p=XYZ,a= ,c=US"
doesn't process at all and the OpenDSObject method returns an automation
error in VB.

thanks,

Brad

 
 
 

ADSI-->LDAP access to Global Address List question

Post by Glenn Corbet » Wed, 18 Feb 1998 04:00:00


Brad,

Don't forget that the LDAP stuff is still in Beta, so not everything works.
I have only installed ADSI onto my workstation, and am calling to another
machine and it works fine.

try this as the ldap path to enumerate users (on an exchange v5.0 / v5.5
server):

LDAP://<ServerName>/o=<Organisation/ou=<Site>/cn=Recipients

For example my home network path is:
LDAP://HOMEPDC/o=HOME/ou=HOME/cn=Recipients

If you have the platform SDK January 1998, look at the sample in:

samples\netds\adsi\sampapp\dsbrowse

There is a bug in the application in the frmbrwstree.cmdproperties_click
method. in the following section:

 For Each v In Class.MandatoryProperties
 --> change here       '** change the \ to a / as shown below
        'Set Property = GetObject(Class.Parent + "\" + v)
        Set Property = GetObject(Class.Parent + "/" + v)
        Value = EmptyVar
        Value = currentADsObj.Get(Property.Name)
        If VarType(Value) = vbEmpty Then
            frmProp.lstProperties.AddItem Property.Name & "(" &
Property.Syntax & _
            "):" & "<Empty>"
        Else
            frmProp.lstProperties.AddItem Property.Name & "(" &
Property.Syntax & _
            "):" & Value
        End If
    Next v

Also to see all of the properties, copy the above code, and then paste
directly after as shown below:

--> changed to OptionalProperties    For Each v In Class.OptionalProperties
        'Set Property = GetObject(Class.Parent + "\" + v)
        Set Property = GetObject(Class.Parent + "/" + v)
        Value = EmptyVar
        Value = currentADsObj.Get(Property.Name)
        'If VarType(Value) = vbEmpty Then
        '    frmProp.lstProperties.AddItem Property.Name & "(" &
Property.Syntax & _
        '    "):" & "<Empty>"
        'Else
            frmProp.lstProperties.AddItem Property.Name & "(" &
Property.Syntax & _
            "):" & Value
        'End If
    Next v

--> changed to NamingProperties    For Each v In Class.NamingProperties
        'Set Property = GetObject(Class.Parent + "\" + v)
        Set Property = GetObject(Class.Parent + "/" + v)
        Value = EmptyVar
        Value = currentADsObj.Get(Property.Name)
        'If VarType(Value) = vbEmpty Then
        '    frmProp.lstProperties.AddItem Property.Name & "(" &
Property.Syntax & _
        '    "):" & "<Empty>"
        'Else
            frmProp.lstProperties.AddItem Property.Name & "(" &
Property.Syntax & _
            "):" & Value
        'End If
    Next v

Finally,

I have had problems browing the LDAP tree using this application, to browse
the LDAP (only) tree change the folling line of code in the
frmBrwsTree.Form_Load event:

    'Default code
    strPath = "ADS:" ' Default start of browse
    'Change to LDAP://<ServerName>
    strPath = "LDAP://HOMEPDC" ' Default start of browse

This should allow you to browse your LDAP tree and see how it is
constructed.

Hope this helps.

If you need any more info, let me know.

Glenn Corbett


>As an addendum, I downloaded the ASDI sdk and still cannot use NDS or LDAP
>to connect to our domain server.  I haven't had a lot of luck using the
code
>snippets I have found on the net, but I was wondering if there is an "ASDI
>service" that I have to install on our server, or is having LDAP running
>sufficient?

>Also, our X.400 connect strings don't look much like the examples I have
>seen and I wonder if ASDI is able to decode them.  For example:
>"LDAP://MyServer/g=Test,s=User,o=MyOrg,p=XYZ,a= ,c=US"
>doesn't process at all and the OpenDSObject method returns an automation
>error in VB.

>thanks,

>Brad

 
 
 

ADSI-->LDAP access to Global Address List question

Post by Amit Chaudhar » Sun, 22 Feb 1998 04:00:00


Try out this
'Print all the users of the Exchange Server
    Dim cont As IADsContainer
    Dim obj As IADs

    Set cont = GetObject("LDAP://QSPL/o=XXXX/ou=YYYY/cn=Recipients")

    Debug.Print "Enumerating Recipients of the Exchange Server QSPL"

    For Each obj In cont
        Debug.Print obj.Name, obj.Class
    Next

Where "QSPL" is your server name(hosting exchange server 5.5). XXXX is the
organization and YYYY is the site as per the Exchange configuration.

Amit


>As an addendum, I downloaded the ASDI sdk and still cannot use NDS or LDAP
>to connect to our domain server.  I haven't had a lot of luck using the
code
>snippets I have found on the net, but I was wondering if there is an "ASDI
>service" that I have to install on our server, or is having LDAP running
>sufficient?

>Also, our X.400 connect strings don't look much like the examples I have
>seen and I wonder if ASDI is able to decode them.  For example:
>"LDAP://MyServer/g=Test,s=User,o=MyOrg,p=XYZ,a= ,c=US"
>doesn't process at all and the OpenDSObject method returns an automation
>error in VB.

>thanks,

>Brad

 
 
 

ADSI-->LDAP access to Global Address List question

Post by David Wad » Tue, 24 Feb 1998 04:00:00


Hi,
 This code works find for small containers. If the container is large it
seems to break for me. Any one else had that problem??.

 
 
 

1. Accessing Global Address List by LDAP from Netscape Messenger

Hi...

I've successfully set up Netscape Messenger 4.7 to access my mailbox on
my company's Exchange server using IMAP.  Now I'm trying to set up a
Netscape LDAP directory to read the Global Address List.  Several
questions:

Is the LDAP server name the same as the IMAP mail server name? I assume
it is, as under Properties for the GAL, if I use OL98, it is (MS
Exchange Address Book Provider).  Am I wrong?
Presumably I have to log in: I log into IMAP using NT password
authentication - will it be the same login for LDAP?
Do I enter the Exchange directory hierarchy path for the GAL anywhere in
the Netscape setup?
And am I wasting my time if my IT administrators have not enabled LDAP
access in the first place?

Thanks to anyone who can help.
--
Julian Rush
Spam protected: reverse xepip for e-mail address.

2. Outgoing messages copy

3. Search Global Address List via ADSI

4. Exchange/Outlook Client in a Banyan Vines Environment

5. Modify Global Address List with ADSI

6. Removing Exchange 5.5 Server from Site

7. Global Access List (GAL) / Contact Folders / LDAP

8. OOPS! I need to do a completely fresh install i think?????

9. Get global address list from Exchange 5.5 Server with LDAP

10. Using LDAP in Outlook to get Global Address List

11. LDAP+Global Address List??

12. LDAP: Container name of Global Address List?

13. LDAP to Global Address List