{"id":77373,"date":"2023-06-05T13:12:15","date_gmt":"2023-06-05T17:12:15","guid":{"rendered":"https:\/\/jumpcloud.com\/?post_type=support&p=77373"},"modified":"2024-08-14T01:31:16","modified_gmt":"2024-08-14T05:31:16","slug":"search-by-user-or-group-in-ldap","status":"publish","type":"support","link":"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap","title":{"rendered":"Search by User or Group in LDAP"},"content":{"rendered":"\n

LDAP has strong search capabilities built into the client and server. You can create both simple and complex search filters to narrow your users or groups to just the ones you want to see. See Use Cloud LDAP<\/a> to learn more.<\/p>\n\n\n\n

This article includes a couple examples of searches you can perform with 黑料海角91入口’s LDAP. <\/p>\n\n\n\n

These examples assume that you already configured your LDAP client properly to query the 黑料海角91入口 LDAP service, and that your query is returning everything in:<\/p>\n\n\n\n

ou=Users,o=,dc=jumpcloud,dc=com<\/code><\/p>\n\n\n\n

For example:<\/p>\n\n\n\n

Using ldapsearch, to filter by inetOrgPerson objectClass:<\/p>\n\n\n\n

ldapsearch -H ldap:\/\/ldap.jumpcloud.com<\/a>:389 -ZZ -x -b “ou=Users,o=YOUR_ORG_ID<\/em>,dc=jumpcloud,dc=com” -D “uid=LDAP_BINDING_USER<\/em>,ou=Users,o=YOUR_ORG_ID<\/em>,dc=jumpcloud,dc=com” -W “(objectClass=inetOrgPerson)”<\/code><\/p>\n\n\n\n

The examples are search filters that apply to the data returned by querying this search base.<\/p>\n\n\n\n

Finding a Specific User<\/h2>\n\n\n\n

There are several ways to query for a specific user account. You’ll see a pattern as you compare the search filter to the output (which you can get via ldapsearch).<\/p>\n\n\n\n

Here is an example of a full LDAP search command:<\/p>\n\n\n\n

All users in the “Users” tab are reflected into the 黑料海角91入口 Hosted LDAP service under the OU “ou=Users,o=<your-organization-id>,dc=jumpcloud;dc=com”. <\/p>\n\n\n\n

For example:<\/p>\n\n\n\n

ldapsearch -H ldaps:\/\/ldap.jumpcloud.com<\/a>:636 -x -b “ou=Users,o=YOUR_ORG_ID<\/em>,dc=jumpcloud,dc=com” -D “uid=<LDAP-binding-username>,ou=Users,o=YOUR_ORG_ID<\/em>,dc=jumpcloud,dc=com” -W “(objectClass=inetOrgPerson)”<\/code><\/p>\n\n\n\n

To find a user in LDAP:<\/strong><\/p>\n\n\n\n

By distinguished name (DN):(uid=john,ou=Users,o=<your-organization-id>,dc=jumpcloud,dc=com)
By full name (cn):(cn=John Doe)
By last name (sn):(sn=Doe)
By given name (givenName):(givenName=John)
By username (uid):(uid=john)
By UID number (uidNumber):(uid=1000)<\/code><\/p>\n\n\n\n

Finding Users in a Specific Group<\/h2>\n\n\n\n

<\/p><\/div>

Note:<\/strong> An LDAP user must be bound to an LDAP group in order for the LDAP group to appear in an ldapsearch.<\/p><\/div><\/div><\/div>\n\n\n\n

When a group of users is bound to LDAP, a groupOfNames<\/strong> object is created in LDAP. In the case of 黑料海角91入口’s hosted LDAP service, this consists of one or more member attributes, and those attributes are the distinguished names of the users in the group. <\/p>\n\n\n\n

To find users in a specific group:<\/strong><\/p>\n\n\n\n

    \n
  1. To find users in a group, search for the groupOfNames<\/strong> object that was created in LDAP.<\/li>\n<\/ol>\n\n\n\n

    For example:<\/p>\n\n\n\n

    When you’re searching for a groupOfNames<\/strong> object called Admins<\/strong>, run the following query.<\/p>\n\n\n\n

    Admins, Users, <org-id><\/code> , jumpcloud.com<\/code><\/p>\n\n\n\n

    dn: cn=Admins,ou=Users,o=<org-id>,dc=jumpcloud,dc=com
    member: uid=john,ou=Users,o=<org-id><\/code>,dc=jumpcloud,dc=com
    member: uid=mary,ou=Users,o=<org-id><\/code>,dc=jumpcloud,dc=com
    objectClass: top
    objectClass: groupOfNames
    description: tagGroup
    cn: Admins
    ou: Admins<\/code>
    In this case, “john” and “mary” are both in the the “Admins” group.
    <\/p>\n\n\n\n

    Getting the Attributes of a Specific Group<\/h2>\n\n\n\n

    (&(objectClass=groupOfNames)(cn=Admins))<\/code><\/p>\n\n\n\n

    The query above says, \u201cshow me only LDAP records where objectClass=groupOfNames<\/strong> (a group), and where the group name (cn) equals Admins<\/strong>“
    <\/p>\n\n\n\n

    Getting the Users in a Specific Group<\/h2>\n\n\n\n

    (&(objectClass=inetOrgPerson)(memberOf=cn=Admins,ou=Users,o=,dc=jumpcloud,dc=com))<\/code><\/p>\n\n\n\n

    The query above says, \u201cgive me only users (objectClass=inetOrgPerson) where the users are members of the Admins<\/strong> group\u201d.<\/p>\n\n\n\n

    <\/p><\/div>

    Note:<\/strong> In the above queries, the queries are surrounded by (&(filter1)(filter2)). This is called “prefix” notation, and is exactly the same as the “infix” notation that you may be more used to, which would look like: (filter1) and (filter2).<\/p><\/div><\/div><\/div>\n\n\n\n

    Additional Resources:<\/strong><\/h4>\n\n\n\n

    Enroll: Configuring LDAP<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

    LDAP has strong search capabilities built into the client and server. You can create both simple and complex search filters […]<\/p>\n","protected":false},"author":204,"featured_media":0,"template":"","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","inline_featured_image":false,"footnotes":""},"support_category":[2845,2896],"support_tag":[],"coauthors":[2838],"acf":[],"yoast_head":"\nSearch by User or Group in LDAP - 黑料海角91入口<\/title>\n<meta name=\"description\" content=\"Learn how to search by user or user group in LDAP.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Search by User or Group in LDAP\" \/>\n<meta property=\"og:description\" content=\"Learn how to search by user or user group in LDAP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap\" \/>\n<meta property=\"og:site_name\" content=\"黑料海角91入口\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-14T05:31:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/07\/202405-MISC-黑料海角91入口HelpCenter-SiteDisplay-min-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"890\" \/>\n\t<meta property=\"og:image:height\" content=\"525\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data2\" content=\"jenniferklein\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap\",\"url\":\"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap\",\"name\":\"Search by User or Group in LDAP - 黑料海角91入口\",\"isPartOf\":{\"@id\":\"https:\/\/jumpcloud.com\/#website\"},\"datePublished\":\"2023-06-05T17:12:15+00:00\",\"dateModified\":\"2024-08-14T05:31:16+00:00\",\"description\":\"Learn how to search by user or user group in LDAP.\",\"breadcrumb\":{\"@id\":\"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jumpcloud.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Support\",\"item\":\"https:\/\/jumpcloud.com\/support\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Search by User or Group in LDAP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jumpcloud.com\/#website\",\"url\":\"https:\/\/jumpcloud.com\/\",\"name\":\"黑料海角91入口\",\"description\":\"Daily insights on directory services, IAM, LDAP, identity security, SSO, system management (Mac, Windows, Linux), networking, and the cloud.\",\"publisher\":{\"@id\":\"https:\/\/jumpcloud.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jumpcloud.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jumpcloud.com\/#organization\",\"name\":\"黑料海角91入口\",\"url\":\"https:\/\/jumpcloud.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png\",\"contentUrl\":\"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png\",\"width\":598,\"height\":101,\"caption\":\"黑料海角91入口\"},\"image\":{\"@id\":\"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Search by User or Group in LDAP - 黑料海角91入口","description":"Learn how to search by user or user group in LDAP.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap","og_locale":"en_US","og_type":"article","og_title":"Search by User or Group in LDAP","og_description":"Learn how to search by user or user group in LDAP.","og_url":"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap","og_site_name":"黑料海角91入口","article_modified_time":"2024-08-14T05:31:16+00:00","og_image":[{"width":890,"height":525,"url":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2024\/07\/202405-MISC-黑料海角91入口HelpCenter-SiteDisplay-min-2.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes","Written by":"jenniferklein"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap","url":"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap","name":"Search by User or Group in LDAP - 黑料海角91入口","isPartOf":{"@id":"https:\/\/jumpcloud.com\/#website"},"datePublished":"2023-06-05T17:12:15+00:00","dateModified":"2024-08-14T05:31:16+00:00","description":"Learn how to search by user or user group in LDAP.","breadcrumb":{"@id":"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jumpcloud.com\/support\/search-by-user-or-group-in-ldap#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jumpcloud.com\/"},{"@type":"ListItem","position":2,"name":"Support","item":"https:\/\/jumpcloud.com\/support"},{"@type":"ListItem","position":3,"name":"Search by User or Group in LDAP"}]},{"@type":"WebSite","@id":"https:\/\/jumpcloud.com\/#website","url":"https:\/\/jumpcloud.com\/","name":"黑料海角91入口","description":"Daily insights on directory services, IAM, LDAP, identity security, SSO, system management (Mac, Windows, Linux), networking, and the cloud.","publisher":{"@id":"https:\/\/jumpcloud.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jumpcloud.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jumpcloud.com\/#organization","name":"黑料海角91入口","url":"https:\/\/jumpcloud.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/","url":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png","contentUrl":"https:\/\/jumpcloud.com\/wp-content\/uploads\/2021\/01\/jc-logo-brand-2021.png","width":598,"height":101,"caption":"黑料海角91入口"},"image":{"@id":"https:\/\/jumpcloud.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support\/77373"}],"collection":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/types\/support"}],"author":[{"embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/users\/204"}],"version-history":[{"count":3,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support\/77373\/revisions"}],"predecessor-version":[{"id":113903,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support\/77373\/revisions\/113903"}],"wp:attachment":[{"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/media?parent=77373"}],"wp:term":[{"taxonomy":"support_category","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support_category?post=77373"},{"taxonomy":"support_tag","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/support_tag?post=77373"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/jumpcloud.com\/wp-json\/wp\/v2\/coauthors?post=77373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}