<?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: Triggering third-party authentication Verification in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/696023#M236592</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259797"&gt;@chimuru84&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;in this case you have to add some fields to the stats command, but the approach is always the same:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=...... earliest=-2y latest=-h [ search index=...... earliest=-h latest=now | dedup id | fields id ]
| eval period=if(_time&amp;gt;now()-31536000, "last Year","Previous Year")
| stats 
     dc(Period) AS Period_count 
     values(Period) AS Period 
     earliest(_time) AS first_date
     latest(_time) AS last_date
     BY id
| where Period_count=1 AND Period!="Previous Year"
| eval 
     nr_of_days=last_date-first_date,
     first_date=strftime(first_date,"%Y-%m-%d %H:%M:%S"),
     last_date=strftime(last_date,"%Y-%m-%d %H:%M:%S")
| table id nr_of_days first_date last_date&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2024 15:27:48 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-08-12T15:27:48Z</dc:date>
    <item>
      <title>Triggering third-party authentication Verification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695418#M236473</link>
      <description>&lt;P&gt;Hello! I'm trying to implement a mechanism&amp;nbsp;&lt;SPAN&gt;to flag users who have not had a third-party authentication verification in the last 365 days.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tried this search, but is not give desired result.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=......
| stats count by id
| search id=*
| eval Duration=relative_time(now(), "-365d@d")
| sort id
| table id Duration | dedup id&lt;/LI-CODE&gt;
&lt;P&gt;I'm grateful for any ideas. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 16:13:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695418#M236473</guid>
      <dc:creator>chimuru84</dc:creator>
      <dc:date>2024-08-06T16:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering third-party authentication Verification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695427#M236474</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259797"&gt;@chimuru84&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you should have a list of your users to be inserted in a lookup (called e.g. users.csv) with one column "id".&lt;/P&gt;&lt;P&gt;then you could run something like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=...... earliest=-365d
| stats count by id
| append [ | inputlookup users.csv | eval count=0 | fields id count ]
| stats sum(count) As total by id
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695427#M236474</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-08-06T15:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering third-party authentication Verification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695492#M236489</link>
      <description>&lt;P&gt;It didn't help... I mean that a user has not made a check for 365 (or more) days until now.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 04:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695492#M236489</guid>
      <dc:creator>chimuru84</dc:creator>
      <dc:date>2024-08-07T04:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering third-party authentication Verification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695503#M236495</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259797"&gt;@chimuru84&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;with this search you take all the checks event in your logs and you compare them with the users list so you can define is there's some user that didn't do any check on the third party.&lt;/P&gt;&lt;P&gt;The main job is to extract the check events from your logs, and I cannot help you on this because I don't know your logs, then you can use my search to compare the results with the users list.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 07:03:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695503#M236495</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-08-07T07:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering third-party authentication Verification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695897#M236564</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;! I think&amp;nbsp;&lt;SPAN&gt;I didn't ask the question correctly. I want to make a query that returns the users who had a third-party authentication (at the moment), and the last time they passed the authentication was 365 days ago.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 08:40:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695897#M236564</guid>
      <dc:creator>chimuru84</dc:creator>
      <dc:date>2024-08-10T08:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering third-party authentication Verification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695898#M236565</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259797"&gt;@chimuru84&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;sorry, I&amp;nbsp; ,isunderstood yur requirement!&lt;/P&gt;&lt;P&gt;let me understand: you want to know the users connected to a third party authentication in the last hour that didn't do another connection in the last year but they did before, is it correct?&lt;/P&gt;&lt;P&gt;at first: how long do you want to run your check: two years?&lt;/P&gt;&lt;P&gt;Then, when you say "authentication at the moment", are you meaning in the last hour or what else?&lt;/P&gt;&lt;P&gt;With the above hypotesis&lt;/P&gt;&lt;P&gt;So, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=...... earliest=-2y latest=-h [ search index=...... earliest=-h latest=now | dedup id | fields id ]
| eval period=if(_time&amp;gt;now()-31536000, "last Year","Previous Year")
| stats 
     dc(Period) AS Period_count 
     values(Period) AS Period 
     BY id
| where Period_count=1 AND Period!="Previous Year"
| table id&lt;/LI-CODE&gt;&lt;P&gt;In ths way, you have yje users connected in the last hour&amp;nbsp; that did the last connection (except the last hour) more than one year.&lt;/P&gt;&lt;P&gt;If you need a different condition, you can use my approach.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 10:56:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/695898#M236565</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-08-10T10:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering third-party authentication Verification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/696010#M236589</link>
      <description>&lt;P class="lia-align-left"&gt;Hello again&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;! Sorry again. I want to return id, nr_of_days (difference between last_date and_first_date), login of last_date (could be today, yesterday, 1 month ago etc.) and login of first_date (where first_date is 365 days or more).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 14:21:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/696010#M236589</guid>
      <dc:creator>chimuru84</dc:creator>
      <dc:date>2024-08-12T14:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering third-party authentication Verification</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/696023#M236592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259797"&gt;@chimuru84&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;in this case you have to add some fields to the stats command, but the approach is always the same:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=...... earliest=-2y latest=-h [ search index=...... earliest=-h latest=now | dedup id | fields id ]
| eval period=if(_time&amp;gt;now()-31536000, "last Year","Previous Year")
| stats 
     dc(Period) AS Period_count 
     values(Period) AS Period 
     earliest(_time) AS first_date
     latest(_time) AS last_date
     BY id
| where Period_count=1 AND Period!="Previous Year"
| eval 
     nr_of_days=last_date-first_date,
     first_date=strftime(first_date,"%Y-%m-%d %H:%M:%S"),
     last_date=strftime(last_date,"%Y-%m-%d %H:%M:%S")
| table id nr_of_days first_date last_date&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 15:27:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Triggering-third-party-authentication-Verification/m-p/696023#M236592</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-08-12T15:27:48Z</dc:date>
    </item>
  </channel>
</rss>

