<?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: Regex Help Event ID 4720 in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/regex-help-event-id-4720/m-p/526676#M3383</link>
    <description>&lt;P&gt;Thanks, Yes that worked&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jan 2023 18:39:11 GMT</pubDate>
    <dc:creator>NathanBradley</dc:creator>
    <dc:date>2023-01-11T18:39:11Z</dc:date>
    <item>
      <title>Regex Help Event ID 4720</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/regex-help-event-id-4720/m-p/526668#M3381</link>
      <description>&lt;P&gt;Im attempting to get out the email address listed as User Principal Name in a 4720 event ID&lt;/P&gt;
&lt;P&gt;Any help or explanation would be appeeciated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dataset = xdr_data &lt;BR /&gt;| filter action_evtlog_event_id = 4720&lt;BR /&gt;| alter User_Name = arrayindex(regextract(action_evtlog_message, "New Account:\r\n.*\r\n.*Account Name:.*?(\w.*)\r\n"),0) &lt;BR /&gt;| alter Create_By = arrayindex(split(arrayindex(regextract(action_evtlog_message , "Account Name:\t\t.*\r\n"),0), ":"),1)&lt;BR /&gt;| alter New_Email = arrayindex(regextract(action_evtlog_message , "User Principal Name:\t.*"),2)&lt;BR /&gt;| fields agent_hostname, User_Name , Create_By , action_evtlog_event_id,New_Email, action_evtlog_message&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 18:12:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/regex-help-event-id-4720/m-p/526668#M3381</guid>
      <dc:creator>NathanBradley</dc:creator>
      <dc:date>2023-01-11T18:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help Event ID 4720</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/regex-help-event-id-4720/m-p/526673#M3382</link>
      <description>&lt;P&gt;Hi NathanBradley,&lt;BR /&gt;I noticed for the arrayindex on the new_email field you have it set to 2, which would tell it to match on the third instance of the matched pattern. In my environment for event ID 4720 I only see one instance of the field "User Principle Name", so I would set the index value to 0 unless you are seeing something different for your events. Also as it stands, you are capturing the text "User Principle Name in addition to the value that would be in that field. Try replacing with the logic below.&lt;BR /&gt;&lt;BR /&gt;| alter New_Email = arrayindex(regextract(action_evtlog_message , "User Principal Name:(\t.*)"),0).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 18:36:29 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/regex-help-event-id-4720/m-p/526673#M3382</guid>
      <dc:creator>bbucao</dc:creator>
      <dc:date>2023-01-11T18:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help Event ID 4720</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/regex-help-event-id-4720/m-p/526676#M3383</link>
      <description>&lt;P&gt;Thanks, Yes that worked&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 18:39:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/regex-help-event-id-4720/m-p/526676#M3383</guid>
      <dc:creator>NathanBradley</dc:creator>
      <dc:date>2023-01-11T18:39:11Z</dc:date>
    </item>
  </channel>
</rss>

