<?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 Re: Combine ldapsearch with simple search in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/570116#M75290</link>
    <description>&lt;P&gt;Is there a document or reference of all the available and supported ldapsearch commands?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Oct 2021 19:05:51 GMT</pubDate>
    <dc:creator>marceloalejandr</dc:creator>
    <dc:date>2021-10-07T19:05:51Z</dc:date>
    <item>
      <title>Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551342#M65595</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;BR /&gt;I'm trying to combine ldapsearch with a simple search&amp;nbsp;&lt;BR /&gt;Here is my query:&amp;nbsp;&lt;BR /&gt;&lt;FONT&gt;|ldapsearch domain="domain_name" search="(objectSid=$added_by$)" attrs=cn |table added_by&lt;BR /&gt;[|search index=windows_audit EventCode=4732 | eval added_by=mvindex(Security_ID,0) | eval Sid=mvindex(Security_ID,1)]&lt;BR /&gt;The idea is to find CN by Sid using ldapsearch function.&amp;nbsp;&lt;BR /&gt;But I got an error&amp;nbsp;&lt;SPAN&gt; Error in 'table' command: Invalid argument: 'Account_Domain=domain_name'&lt;BR /&gt;&lt;BR /&gt;Query like:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;|ldapsearch domain="domain_name" search="(objectSid="some_sid")" attrs=cn |table cn&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is working perfect on my splunk.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 12:23:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551342#M65595</guid>
      <dc:creator>Dalador</dc:creator>
      <dc:date>2021-05-12T12:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551349#M65597</link>
      <description>&lt;P&gt;Putting square brackets around part of query is like putting parentheses around part of a math equation - it makes that part go first with the result replacing what was inside.&amp;nbsp; That's why the table command is reporting an invalid argument.&amp;nbsp; You'll have to rearrange the query a little to get the desired result.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|ldapsearch domain="domain_name" search="(objectSid=[|search index=windows_audit EventCode=4732 | eval added_by=mvindex(Security_ID,0) | eval Sid=mvindex(Security_ID,1) | return $added_by])" attrs=cn 
|table added_by&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 May 2021 13:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551349#M65597</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-05-12T13:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551352#M65598</link>
      <description>&lt;P&gt;This returns&amp;nbsp;&lt;SPAN&gt; External search command 'ldapsearch' returned error code 1. Script output = "error_message=malformed filter&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2021-05-12 162111.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14122iB1D64DEF3DF79364/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2021-05-12 162111.png" alt="Annotation 2021-05-12 162111.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 13:22:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551352#M65598</guid>
      <dc:creator>Dalador</dc:creator>
      <dc:date>2021-05-12T13:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551357#M65599</link>
      <description>&lt;P&gt;Run the subsearch by itself to see what it returns.&amp;nbsp; Then add &lt;FONT face="courier new,courier"&gt;eval&lt;/FONT&gt;&amp;nbsp;or other statements as necessary to make the returned value conform to what your LDAP provider expects.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 13:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551357#M65599</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-05-12T13:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551360#M65600</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2021-05-12 165951.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14123iB8799941C0D4ED66/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2021-05-12 165951.png" alt="Annotation 2021-05-12 165951.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;BR /&gt;I think soon I get the solution. Now I need to get rid off Sid="...", right?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 14:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551360#M65600</guid>
      <dc:creator>Dalador</dc:creator>
      <dc:date>2021-05-12T14:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551397#M65603</link>
      <description>&lt;P&gt;Yes, and you can do that using &lt;FONT face="courier new,courier"&gt;return $Sid&lt;/FONT&gt;, as in my original answer.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 20:43:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551397#M65603</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-05-12T20:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551426#M65605</link>
      <description>&lt;P&gt;I don't know why but query&amp;nbsp;&lt;BR /&gt;index=windows_audit EventCode=4732 | eval added_by=mvindex(Security_ID,0) | eval Sid=mvindex(Security_ID,1) | return $Sid return only 1 result,&amp;nbsp; and then i use your original answer i got&amp;nbsp;&lt;/P&gt;&lt;DIV class="alerts search-searchflashmessages"&gt;&lt;DIV class="alert alert-error"&gt;Unrecognized ldapsearch command option: Sid="\"S-1-5-21-1778430667-2033019328-1848965733-3395\""&lt;BR /&gt;&lt;BR /&gt;Is there possible to use &amp;nbsp;|ldapsearch domain="my_domain" search="(&amp;amp;(objectSid="[|search index=windows_audit EventCode=4732 | eval added_by=mvindex(Security_ID,0) | eval Sid=mvindex(Security_ID,1) | return Sid]"))" attrs=cn&lt;BR /&gt;|table cn, Sid&amp;nbsp;&lt;BR /&gt;For several results in sub-search?&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="job-status-container"&gt;&lt;DIV class="shared-jobstatus"&gt;&lt;DIV class="clearfix"&gt;&lt;DIV class="pull-left jobstatus-status-grouping"&gt;&lt;DIV class="status shared-jobstatus-count"&gt;&lt;BR /&gt;Thank you!&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 May 2021 08:14:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551426#M65605</guid>
      <dc:creator>Dalador</dc:creator>
      <dc:date>2021-05-13T08:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551447#M65608</link>
      <description>&lt;P&gt;The return command returns a single result by default.&amp;nbsp; You can add a number to say how many results to return, however, doing so may not give the desired results.&amp;nbsp; For example,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| return 1000 $Sid&lt;/LI-CODE&gt;&lt;P&gt;will return a string like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;((Sid="\"S-1-5-21-1778430667-2033019328-1848965733-3395\"") OR ( Sid="\"S-1-5-21-1778430667-2033019328-1848965733-3396\"") OR ...)&lt;/LI-CODE&gt;&lt;P&gt;which I believe is not the correct syntax for LDAP.&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 12:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551447#M65608</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-05-13T12:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551455#M65609</link>
      <description>&lt;P&gt;I decided to rewrite my query&amp;nbsp;&lt;BR /&gt;now i'm doing:&amp;nbsp;&lt;BR /&gt;| ldapsearch domain=my_domain search="(&amp;amp;(objectClass=user)(!(objectClass=computer)))" attrs="objectSid,sAMAccountName" | outputlookup Ldap.csv&lt;BR /&gt;and then do my main search&amp;nbsp;&lt;BR /&gt;Do you now how can I run this by a cron?Shoud i use alert function to schedule this search?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 13:32:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551455#M65609</guid>
      <dc:creator>Dalador</dc:creator>
      <dc:date>2021-05-13T13:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551460#M65610</link>
      <description>&lt;P&gt;Make it a scheduled report rather than an alert.&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 14:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/551460#M65610</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-05-13T14:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/570116#M75290</link>
      <description>&lt;P&gt;Is there a document or reference of all the available and supported ldapsearch commands?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 19:05:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/570116#M75290</guid>
      <dc:creator>marceloalejandr</dc:creator>
      <dc:date>2021-10-07T19:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Combine ldapsearch with simple search</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/570124#M75291</link>
      <description>&lt;P&gt;Please disregard my previous message.&amp;nbsp; I was able to find the information on ldapsearch command at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SA-LdapSearch/3.0.3/User/Theldapsearchcommand" target="_blank"&gt;https://docs.splunk.com/Documentation/SA-LdapSearch/3.0.3/User/Theldapsearchcommand&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However I am curious if anyone has worked with ADFineGrainedPasswordPolicy and have been able to return users that are in this Policy using ldapsearch.&amp;nbsp; &amp;nbsp; Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 19:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Combine-ldapsearch-with-simple-search/m-p/570124#M75291</guid>
      <dc:creator>marceloalejandr</dc:creator>
      <dc:date>2021-10-07T19:20:32Z</dc:date>
    </item>
  </channel>
</rss>

