简体   繁体   中英

How to query Active Directory through attributeID (urn:iod) by ldapsearch or Powershell

I need to query AD by attributeID like: urn:oid:2.5.4.42

Instead of friendlyname: "givenname"

How should I query AD by URN:OID?

Thank you!

You can just replace the attributeName with its OID in the LDAPFilter like this:

(&(objectCategory=person)(objectClass=user)(2.5.4.42=Oliver))

This would find all user objects with givenName "Oliver"...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM