<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic LDAP Query:  Pull the Description and Office fields within AD in Security</title>
    <link>https://community.splunk.com/t5/Security/LDAP-Query-Pull-the-Description-and-Office-fields-within-AD/m-p/474166#M10983</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need to pull the description and office fields in active directory in my SPL query.  What would be the best syntax to use.  What I am doing is simply a basic string search for "TOR" and would like the results to list also the user's description and office field values within AD.&lt;/P&gt;

&lt;P&gt;Current Search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype=* "TOR"
|stats count by user
|ldapfilter search="(&amp;amp;(objectclass=user)(!(objectClass=computer))(samAccountName=$samAccountName$))" attrs="description, physicalDeliveryOfficeName"
|sort -count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Jan 2020 15:34:33 GMT</pubDate>
    <dc:creator>itsmevic</dc:creator>
    <dc:date>2020-01-02T15:34:33Z</dc:date>
    <item>
      <title>LDAP Query:  Pull the Description and Office fields within AD</title>
      <link>https://community.splunk.com/t5/Security/LDAP-Query-Pull-the-Description-and-Office-fields-within-AD/m-p/474166#M10983</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need to pull the description and office fields in active directory in my SPL query.  What would be the best syntax to use.  What I am doing is simply a basic string search for "TOR" and would like the results to list also the user's description and office field values within AD.&lt;/P&gt;

&lt;P&gt;Current Search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype=* "TOR"
|stats count by user
|ldapfilter search="(&amp;amp;(objectclass=user)(!(objectClass=computer))(samAccountName=$samAccountName$))" attrs="description, physicalDeliveryOfficeName"
|sort -count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Jan 2020 15:34:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/LDAP-Query-Pull-the-Description-and-Office-fields-within-AD/m-p/474166#M10983</guid>
      <dc:creator>itsmevic</dc:creator>
      <dc:date>2020-01-02T15:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP Query:  Pull the Description and Office fields within AD</title>
      <link>https://community.splunk.com/t5/Security/LDAP-Query-Pull-the-Description-and-Office-fields-within-AD/m-p/474167#M10984</link>
      <description>&lt;P&gt;I don't have experience with this command, but the examples in the documentation show outputting to the "table" command. You might want to try adding:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| table user,description,physicalDeliveryOfficeName,count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;ahead of the sort&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 16:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/LDAP-Query-Pull-the-Description-and-Office-fields-within-AD/m-p/474167#M10984</guid>
      <dc:creator>mydog8it</dc:creator>
      <dc:date>2020-01-02T16:01:12Z</dc:date>
    </item>
  </channel>
</rss>

