Quels sont les variables ldap ??

Signaler
Messages postés
13
Date d'inscription
mercredi 9 janvier 2002
Statut
Membre
Dernière intervention
19 décembre 2002
-
Messages postés
13
Date d'inscription
jeudi 2 septembre 2004
Statut
Membre
Dernière intervention
28 janvier 2005
-
bonjour,
j'accede au ldap par la requette sql suivante :
strQuery = "SELECT cn, mail FROM 'LDAP://ip du serveur ldap' WHERE objectCategory='"&CStr(Request.Form("lstCategory"))&"' order by cn"

cn = common name
mail = email

ou trouver une liste complete de ses variables afin que je puisse determiner les valeurs/données à recuperer par profil ???
par exemple le telephone, la page d' accueil, etc...

merci!
:)

7 réponses

Messages postés
404
Date d'inscription
mardi 18 décembre 2001
Statut
Membre
Dernière intervention
15 juillet 2014
20
essaie avec select *
puis fait

for i=0 to ObjRecordset.Fields.count-1
ObjRecordset.fields(i).name
next

mais en général on fait du LDAP via active directory et non en lisant directement les tables avec SQL
Messages postés
13
Date d'inscription
mercredi 9 janvier 2002
Statut
Membre
Dernière intervention
19 décembre 2002

bonjour,
merci a shaiulud, mais je n'ai pu acceder à la liste des variables de cette methode.

mais, j'ai trouvé ce matin (la nuit porte conseil) :)
qu'il etait possible de connaitre la totalité des variables (enfin je crois la totalité) par la console (mmc), Ajouter/Supprimer un composant logiciel enfichable, et Ajoutez Schema Active Directory
:)
de la aller dans Classes/User et la liste des variables apparait

PS : shaiulud, peux tu expliquer ce que tu entends par une autre methode pour acceder au ldap ? merci

@plus ;)
Messages postés
404
Date d'inscription
mardi 18 décembre 2001
Statut
Membre
Dernière intervention
15 juillet 2014
20
on utilise la méthode OpenDSObject d'active directory

set oLDAP = GetObject("LDAP:")
set oADsSelectContainer = API_oLDAP.OpenDSObject("LDAP://serverLDAP:389/o=Organization/ou=Members/cn=CompteALire", "cn=Administrator,ou=Members,o=Organization", password, 0)
oADsSelectContainer.Get "cn"
oADsSelectContainer.Get "mail"
...
set oADsSelectContainer = Nothing
set oLDAP = Nothing
Messages postés
404
Date d'inscription
mardi 18 décembre 2001
Statut
Membre
Dernière intervention
15 juillet 2014
20
Messages postés
4
Date d'inscription
dimanche 2 mars 2003
Statut
Membre
Dernière intervention
7 février 2008

J'en avais aussi besoin et j'ai pu la récupérer de visio, alors attention les yeux c'est plutot violent :big) (j'éspere que ca vous serat utile!):

accountExpires
accountNameHistory
aCSAggregateTokenRatePerUser
aCSAllocableRSVPBandwidth
aCSCacheTimeout
aCSDirection
aCSDSBMDeadTime
aCSDSBMPriority
aCSDSBMRefresh
aCSEnableACSService
aCSEnableRSVPAccounting
aCSEnableRSVPMessageLogging
aCSEventLogLevel
aCSIdentityName
aCSMaxAggregatePeakRatePerUser
aCSMaxDurationPerFlow
aCSMaximumSDUSize
aCSMaxNoOfAccountFiles
aCSMaxNoOfLogFiles
aCSMaxPeakBandwidth
aCSMaxPeakBandwidthPerFlow
aCSMaxSizeOfRSVPAccountFile
aCSMaxSizeOfRSVPLogFile
aCSMaxTokenBucketPerFlow
aCSMaxTokenRatePerFlow
aCSMinimumDelayVariation
aCSMinimumLatency
aCSMinimumPolicedSize
aCSNonReservedMaxSDUSize
aCSNonReservedMinPolicedSize
aCSNonReservedPeakRate
aCSNonReservedTokenSize
aCSNonReservedTxLimit
aCSNonReservedTxSize
aCSPermissionBits
aCSPolicyName
aCSPriority
aCSRSVPAccountFilesLocation
aCSRSVPLogFilesLocation
aCSServerList
aCSServiceType
aCSTimeOfDay
aCSTotalNoOfFlows
additionalTrustedServiceNames
addressBookRoots
addressEntryDisplayTable
addressEntryDisplayTableMSDOS
addressSyntax
addressType
adminContextMenu
adminCount
adminDescription
adminDisplayName
adminPropertyPages
allowedAttributes
allowedAttributesEffective
allowedChildClasses
allowedChildClassesEffective
altSecurityIdentities
aNR
applicationName
appliesTo
appSchemaVersion
assetNumber
assistant
assocNTAccount
attributeDisplayNames
attributeID
attributeSecurityGUID
attributeSyntax
attributeTypes
auditingPolicy
authenticationOptions
authorityRevocationList
auxiliaryClass
badPasswordTime
badPwdCount
birthLocation
bridgeheadServerListBL
bridgeheadTransportList
builtinCreationTime
builtinModifiedCount
businessCategory
bytesPerMinute
c
cACertificate
cACertificateDN
cAConnect
canonicalName
canUpgradeScript
catalogs
categories
categoryId
cAUsages
cAWEBURL
certificateAuthorityObject
certificateRevocationList
certificateTemplates
classDisplayName
cn
co
codePage
cOMClassID
cOMCLSID
cOMInterfaceID
comment
cOMOtherProgId
company
cOMProgID
cOMTreatAsClassId
cOMTypelibId
cOMUniqueLIBID
contentIndexingAllowed
contextMenu
controlAccessRights
cost
countryCode
createDialog
createTimeStamp
createWizardExt
creationTime
creationWizard
creator
cRLObject
cRLPartitionedRevocationList
crossCertificatePair
currentLocation
currentParentCA
currentValue
currMachineId
dBCSPwd
dc
defaultClassStore
defaultGroup
defaultHidingValue
defaultLocalPolicyObject
defaultObjectCategory
defaultPriority
defaultSecurityDescriptor
deltaRevocationList
department
description
desktopProfile
destinationIndicator
dhcpClasses
dhcpFlags
dhcpIdentification
dhcpMask
dhcpMaxKey
dhcpObjDescription
dhcpObjName
dhcpOptions
dhcpProperties
dhcpRanges
dhcpReservations
dhcpServers
dhcpSites
dhcpState
dhcpSubnets
dhcpType
dhcpUniqueKey
dhcpUpdateTime
directReports
displayName
displayNamePrintable
distinguishedName
dITContentRules
division
dMDLocation
dmdName
dNReferenceUpdate
dnsAllowDynamic
dnsAllowXFR
dNSHostName
dnsNotifySecondaries
dNSProperty
dnsRecord
dnsRoot
dnsSecureSecondaries
dNSTombstoned
domainCAs
domainCrossRef
domainID
domainIdentifier
domainPolicyObject
domainPolicyReference
domainReplica
domainWidePolicy
driverName
driverVersion
dSASignature
dSCorePropagationData
dSHeuristics
dSUIAdminMaximum
dSUIAdminNotification
dSUIShellMaximum
dynamicLDAPServer
eFSPolicy
employeeID
employeeNumber
employeeType
Enabled
enabledConnection
enrollmentProviders
extendedAttributeInfo
extendedCharsAllowed
extendedClassInfo
extensionName
facsimileTelephoneNumber
fileExtPriority
flags
flatName
forceLogoff
foreignIdentifier
friendlyNames
fromEntry
fromServer
frsComputerReference
frsComputerReferenceBL
fRSControlDataCreation
fRSControlInboundBacklog
fRSControlOutboundBacklog
fRSDirectoryFilter
fRSDSPoll
fRSExtensions
fRSFaultCondition
fRSFileFilter
fRSFlags
fRSLevelLimit
fRSMemberReference
fRSMemberReferenceBL
fRSPartnerAuthLevel
fRSPrimaryMember
fRSReplicaSetGUID
fRSReplicaSetType
fRSRootPath
fRSRootSecurity
fRSServiceCommand
fRSServiceCommandStatus
fRSStagingPath
fRSTimeLastCommand
fRSTimeLastConfigChange
fRSUpdateTimeout
fRSVersion
fRSVersionGUID
fRSWorkingPath
fSMORoleOwner
garbageCollPeriod
generatedConnection
generationQualifier
givenName
globalAddressList
governsID
gPCFileSysPath
gPCFunctionalityVersion
gPCMachineExtensionNames
gPCUserExtensionNames
gPLink
gPOptions
groupAttributes
groupMembershipSAM
groupPriority
groupsToIgnore
groupType
hasMasterNCs
hasPartialReplicaNCs
helpData16
helpData32
helpFileName
homeDirectory
homeDrive
homePhone
homePostalAddress
iconPath
implementedCategories
indexedScopes
info
initialAuthIncoming
initialAuthOutgoing
initials
installUiLevel
instanceType
internationalISDNNumber
interSiteTopologyFailover
interSiteTopologyGenerator
interSiteTopologyRenew
invocationId
ipPhone
ipsecData
ipsecDataType
ipsecFilterReference
ipsecID
ipsecISAKMPReference
ipsecName
iPSECNegotiationPolicyAction
ipsecNegotiationPolicyReference
iPSECNegotiationPolicyType
ipsecNFAReference
ipsecOwnersReference
ipsecPolicyReference
isCriticalSystemObject
isDefunct
isDeleted
isEphemeral
isMemberOfPartialAttributeSet
isPrivilegeHolder
isSingleValued
keywords
knowledgeInformation
l
lastBackupRestorationTime
lastContentIndexed
lastKnownParent
lastLogoff
lastLogon
lastSetTime
lastUpdateSequence
lDAPAdminLimits
lDAPDisplayName
lDAPIPDenyList
legacyExchangeDN
linkID
linkTrackSecret
lmPwdHistory
localeID
localizationDisplayId
localizedDescription
localPolicyFlags
localPolicyReference
location
lockoutDuration
lockOutObservationWindow
lockoutThreshold
lockoutTime
logonCount
logonHours
logonWorkstation
lSACreationTime
lSAModifiedCount
machineArchitecture
machinePasswordChangeInterval
machineRole
machineWidePolicy
mail
mailAddress
managedBy
managedObjects
manager
mAPIID
marshalledInterface
masteredBy
maxPwdAge
maxRenewAge
maxStorage
maxTicketAge
mayContain
meetingAdvertiseScope
meetingApplication
meetingBandwidth
meetingBlob
meetingContactInfo
meetingDescription
meetingEndTime
meetingID
meetingIP
meetingIsEncrypted
meetingKeyword
meetingLanguage
meetingLocation
meetingMaxParticipants
meetingName
meetingOriginator
meetingOwner
meetingProtocol
meetingRating
meetingRecurrence
meetingScope
meetingStartTime
meetingType
meetingURL
member
memberOf
mhsORAddress
middleName
minPwdAge
minPwdLength
minTicketAge
mobile
modifiedCount
modifiedCountAtLastProm
modifyTimeStamp
moniker
monikerDisplayName
moveTreeState
mscopeId
mS-DS-ConsistencyChildCount
mS-DS-ConsistencyGuid
mS-DS-CreatorSID
ms-DS-MachineAccountQuota
mS-DS-ReplicatesNCReason
msiFileList
msiScript
msiScriptName
msiScriptPath
msiScriptSize
mSMQAuthenticate
mSMQBasePriority
mSMQComputerType
mSMQComputerTypeEx
mSMQCost
mSMQCSPName
mSMQDependentClientService
mSMQDependentClientServices
mSMQDigests
mSMQDigestsMig
mSMQDsService
mSMQDsServices
mSMQEncryptKey
mSMQForeign
mSMQInRoutingServers
mSMQInterval1
mSMQInterval2
mSMQJournal
mSMQJournalQuota
mSMQLabel
mSMQLabelEx
mSMQLongLived
mSMQMigrated
mSMQNameStyle
mSMQNt4Flags
mSMQNt4Stub
mSMQOSType
mSMQOutRoutingServers
mSMQOwnerID
mSMQPrevSiteGates
mSMQPrivacyLevel
mSMQQMID
mSMQQueueJournalQuota
mSMQQueueNameExt
mSMQQueueQuota
mSMQQueueType
mSMQQuota
mSMQRoutingService
mSMQRoutingServices
mSMQServices
mSMQServiceType
mSMQSignCertificates
mSMQSignCertificatesMig
mSMQSignKey
mSMQSite1
mSMQSite2
mSMQSiteForeign
mSMQSiteGates
mSMQSiteGatesMig
mSMQSiteID
mSMQSiteName
mSMQSiteNameEx
mSMQSites
mSMQTransactional
mSMQUserSid
mSMQVersion
msNPAllowDialin
msNPCalledStationID
msNPCallingStationID
msNPSavedCallingStationID
msRADIUSCallbackNumber
msRADIUSFramedIPAddress
msRADIUSFramedRoute
msRADIUSServiceType
msRASSavedCallbackNumber
msRASSavedFramedIPAddress
msRASSavedFramedRoute
msRRASAttribute
msRRASVendorAttributeEntry
mS-SQL-Alias
mS-SQL-AllowAnonymousSubscription
mS-SQL-AllowImmediateUpdatingSubscription
mS-SQL-AllowKnownPullSubscription
mS-SQL-AllowQueuedUpdatingSubscription
mS-SQL-AllowSnapshotFilesFTPDownloading
mS-SQL-AppleTalk
mS-SQL-Applications
mS-SQL-Build
mS-SQL-CharacterSet
mS-SQL-Clustered
mS-SQL-ConnectionURL
mS-SQL-Contact
mS-SQL-CreationDate
mS-SQL-Database
mS-SQL-Description
mS-SQL-GPSHeight
mS-SQL-GPSLatitude
mS-SQL-GPSLongitude
mS-SQL-InformationDirectory
mS-SQL-InformationURL
mS-SQL-Keywords
mS-SQL-Language
mS-SQL-LastBackupDate
mS-SQL-LastDiagnosticDate
mS-SQL-LastUpdatedDate
mS-SQL-Location
mS-SQL-Memory
mS-SQL-MultiProtocol
mS-SQL-Name
mS-SQL-NamedPipe
mS-SQL-PublicationURL
mS-SQL-Publisher
mS-SQL-RegisteredOwner
mS-SQL-ServiceAccount
mS-SQL-Size
mS-SQL-SortOrder
mS-SQL-SPX
mS-SQL-Status
mS-SQL-TCPIP
mS-SQL-ThirdParty
mS-SQL-Type
mS-SQL-UnicodeSortOrder
mS-SQL-Version
mS-SQL-Vines
mustContain
name
nameServiceFlags
nCName
nETBIOSName
netbootAllowNewClients
netbootAnswerOnlyValidClients
netbootAnswerRequests
netbootCurrentClientCount
netbootGUID
netbootInitialization
netbootIntelliMirrorOSes
netbootLimitClients
netbootLocallyInstalledOSes
netbootMachineFilePath
netbootMaxClients
netbootMirrorDataFile
netbootNewMachineNamingPolicy
netbootNewMachineOU
netbootSCPBL
netbootServer
netbootSIFFile
netbootTools
networkAddress
nextLevelStore
nextRid
nonSecurityMember
nonSecurityMemberBL
notes
notificationList
nTGroupMembers
nTMixedDomain
ntPwdHistory
nTSecurityDescriptor
o
objectCategory
objectClass
objectClassCategory
objectClasses
objectCount
objectGUID
objectSid
objectVersion
oEMInformation
oMObjectClass
oMSyntax
oMTGuid
oMTIndxGuid
operatingSystem
operatingSystemHotfix
operatingSystemServicePack
operatingSystemVersion
operatorCount
optionDescription
options
optionsLocation
originalDisplayTable
originalDisplayTableMSDOS
otherFacsimileTelephoneNumber
otherHomePhone
otherIpPhone
otherLoginWorkstations
otherMailbox
otherMobile
otherPager
otherTelephone
otherWellKnownObjects
ou
owner
packageFlags
packageName
packageType
pager
parentCA
parentCACertificateChain
parentGUID
partialAttributeDeletionList
partialAttributeSet
pekKeyChangeInterval
pekList
pendingCACertificates
pendingParentCA
perMsgDialogDisplayTable
perRecipDialogDisplayTable
personalTitle
physicalDeliveryOfficeName
physicalLocationObject
pKICriticalExtensions
pKIDefaultCSPs
pKIDefaultKeySpec
pKIEnrollmentAccess
pKIExpirationPeriod
pKIExtendedKeyUsage
pKIKeyUsage
pKIMaxIssuingDepth
pKIOverlapPeriod
pKT
pKTGuid
policyReplicationFlags
portName
possibleInferiors
possSuperiors
postalAddress
postalCode
postOfficeBox
preferredDeliveryMethod
preferredOU
prefixMap
presentationAddress
previousCACertificates
previousParentCA
primaryGroupID
primaryGroupToken
primaryInternationalISDNNumber
primaryTelexNumber
printAttributes
printBinNames
printCollate
printColor
printDuplexSupported
printEndTime
printerName
printFormName
printKeepPrintedJobs
printLanguage
printMACAddress
printMaxCopies
printMaxResolutionSupported
printMaxXExtent
printMaxYExtent
printMediaReady
printMediaSupported
printMemory
printMinXExtent
printMinYExtent
printNetworkAddress
printNotify
printNumberUp
printOrientationsSupported
printOwner
printPagesPerMinute
printRate
printRateUnit
printSeparatorFile
printShareName
printSpooling
printStaplingSupported
printStartTime
printStatus
priority
priorSetTime
priorValue
privateKey
privilegeAttributes
privilegeDisplayName
privilegeHolder
privilegeValue
productCode
profilePath
proxiedObjectName
proxyAddresses
proxyGenerationEnabled
proxyLifetime
publicKeyPolicy
purportedSearch
pwdHistoryLength
pwdLastSet
pwdProperties
qualityOfService
queryFilter
queryPoint
queryPolicyBL
queryPolicyObject
rangeLower
rangeUpper
rDNAttID
registeredAddress
remoteServerName
remoteSource
remoteSourceType
remoteStorageGUID
replicaSource
replInterval
replPropertyMetaData
replTopologyStayOfExecution
replUpToDateVector
repsFrom
repsTo
requiredCategories
retiredReplDSASignatures
revision
rid
rIDAllocationPool
rIDAvailablePool
rIDManagerReference
rIDNextRID
rIDPreviousAllocationPool
rIDSetReferences
rIDUsedPool
rightsGuid
roleOccupant
rootTrust
rpcNsAnnotation
rpcNsBindings
rpcNsCodeset
rpcNsEntryFlags
rpcNsGroup
rpcNsInterfaceID
rpcNsObjectID
rpcNsPriority
rpcNsProfileEntry
rpcNsTransferSyntax
sAMAccountName
sAMAccountType
schedule
schemaFlagsEx
schemaIDGUID
schemaInfo
schemaUpdate
schemaVersion
scopeFlags
scriptPath
sDRightsEffective
searchFlags
searchGuide
securityIdentifier
seeAlso
seqNotification
serialNumber
serverName
serverReference
serverReferenceBL
serverRole
serverState
serviceBindingInformation
serviceClassID
serviceClassInfo
serviceClassName
serviceDNSName
serviceDNSNameType
serviceInstanceVersion
servicePrincipalName
setupCommand
shellContextMenu
shellPropertyPages
shortServerName
showInAddressBook
showInAdvancedViewOnly
sIDHistory
signatureAlgorithms
siteGUID
siteLinkList
siteList
siteObject
siteObjectBL
siteServer
sn
sPNMappings
st
street
streetAddress
subClassOf
subRefs
subSchemaSubEntry
superiorDNSRoot
superScopeDescription
superScopes
supplementalCredentials
supportedApplicationContext
syncAttributes
syncMembership
syncWithObject
syncWithSID
systemAuxiliaryClass
systemFlags
systemMayContain
systemMustContain
systemOnly
systemPossSuperiors
telephoneNumber
teletexTerminalIdentifier
telexNumber
templateRoots
terminalServer
textEncodedORAddress
thumbnailLogo
thumbnailPhoto
timeRefresh
timeVolChange
title
tokenGroups
tokenGroupsGlobalAndUniversal
tokenGroupsNoGCAcceptable
tombstoneLifetime
transportAddressAttribute
transportDLLName
transportType
treatAsLeaf
treeName
trustAttributes
trustAuthIncoming
trustAuthOutgoing
trustDirection
trustParent
trustPartner
trustPosixOffset
trustType
uASCompat
uNCName
unicodePwd
upgradeProductCode
uPNSuffixes
url
userAccountControl
userCert
userCertificate
userParameters
userPassword
userPrincipalName
userSharedFolder
userSharedFolderOther
userSMIMECertificate
userWorkstations
uSNChanged
uSNCreated
uSNDSALastObjRemoved
USNIntersite
uSNLastObjRem
uSNSource
validAccesses
vendor
versionNumber
versionNumberHi
versionNumberLo
volTableGUID
volTableIdxGUID
volumeCount
wbemPath
wellKnownObjects
whenChanged
whenCreated
winsockAddresses
wWWHomePage
x121Address
Messages postés
5
Date d'inscription
lundi 16 décembre 2002
Statut
Membre
Dernière intervention
27 octobre 2004

J'ai un souci avec employeeID

Posté le: Mar Oct 26, 2004 13:51 Sujet du message: [C#] Active Directory: Problème DirectorySearcher/employeeID

--------------------------------------------------------------------------------

But : Afficher un user avec son mail et son employeeID

Code simplifié :

Code:

// récupération des propriétés des attributs désirés 
searcher.PropertiesToLoad.Add("mail"); 
searcher.PropertiesToLoad.Add("employeeID"); 

foreach (SearchResult result in searcher.FindAll()) { 
string mail; 
string num_emp; 
mail.Text = DirEntry.Properties["mail"].Value.ToString(); 
num_emp.Text = DirEntry.Properties["employeeID"].Value.ToString(); 
} 


Erreur retournée : Le type de donnée répertoire ne peut pas être converti à partir/vers un type de donnée de service d'annuaire natif
Messages postés
13
Date d'inscription
jeudi 2 septembre 2004
Statut
Membre
Dernière intervention
28 janvier 2005

Salut ovincent
je voudrait savoir si tu as fait qqchose en
particulier pour avoir shema active directory dans logiciel enfichable
de la console....

moi je trouve pas sur mon serveur ou en poste client
Vive les Galères de Dev......