|
-
How to retrieve Assoc-NT-Account in format DOMAIN/USER from LDAP
How to retrieve Assoc-NT-Account in format DOMAIN/USER from LDAP
Is there any way? I got some array but I dont know what to do next.
Im trying this but it isnt working:
Dim myLDAP As IADsContainer
Dim Member As IADsUser
Dim strText() As Variant
Set myLDAP = GetObject("LDAP://servername/o=org/ou=unit./cn=Recipients")
For Each Member In myLDAP
If Member.Class = "organizationalPerson" Then
Member.GetInfoEx Array("Assoc-NT-Account"), 0
ReDim strText(256)
strText = Member.GetEx("Assoc-NT-Account")
End If
Next Member
End Sub
--
-----------------------------------------------
Endys Miroslav
endys@atlas.cz
PGP Fingerprint: D1B9 A6A6 AE86 C9C8 FABB 55E0 50E2 8812 9910 04C2
-
Re: How to retrieve Assoc-NT-Account in format DOMAIN/USER from LDAP
Endys,
I don't have Exchange to test this on but according to the docs:
"When creating an Exchange mailbox, you must associate the mailbox with a
Windows NT account. This value is stored in the Assoc-NT-Account attribute
of the mailbox. This value is the SID, which is the binary representation of
the Windows NT account. Again, ADSI is capable of setting the value of this
attribute once it's created, but cannot create the attribute from a
domain\username pair such as "NORTHAMERICA\jsmith"."
Once you have the SID, you should be able to use syntax like the following
to get the rest of the user info:
Dim x As IADs
Set x = GetObject("LDAP://servername/<GUID=xxx>")
--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnsn@Flash.Net or LJJohnson@mvps.org
<http://www.flash.net/~ljjohnsn>
Ask The NT Pro at <http://www.inquiry.com>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks