Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get LDAP attributes used for users
Message
De
22/06/2004 05:58:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/06/2004 10:55:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00915644
Message ID:
00915949
Vues:
9
>I want to get a list of the attributes used at a directory service (LDAPv3). Is there a way to do that (w/o checking user by user)?
>Example :
>Suppose only attributeA and attributeB are used for the majority of entries but few users also has attributeC and attributeD. How could I get a list as :
>attributeA, B, C, D.
>TIA
>Cetin

Solved finally. What I missed, there were MAndatory and OptionalProperties collection members :
strServer       = "servername"
strPort         = "389"
strRoot         = "root"

strContainer    = "OU=My OU"
strName         = "CN=A Known User"

strPath         = "LDAP://" + strServer + ":" + strPort + "/"
strMember       = strName + ;
	Iif(Empty(strContainer),"",",")+strContainer + ;
	Iif(Empty(strRoot),"",",") + strRoot

* Get reference to a known member
objMember    = GetObject(strPath+strMember)

Set Textmerge to memvar adsiprops noshow
Set Textmerge on

* Get class properties
oClass = GetObject(objMember.Schema)
\ "Class Name is: ", <<oClass.Name>> && User
\ "Mandatory Properties: "
\ "----------------------"
For Each mp In oClass.MandatoryProperties
    \<<mp>>
Endfor

\
\ "Optional Properties: "
\ "----------------------"
For Each op In oClass.OptionalProperties
    \<<op>>
Endfor
Set Textmerge to
Set Textmerge off
_cliptext = adsiprops && Put in clipboard
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform