<?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: Retrieve Office 365 audit event property retrieval in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-a-search-to-Retrieve-Office-365-audit-event/m-p/593078#M206436</link>
    <description>&lt;P&gt;I came across this post while trying to figure out how to solve the same issue, and I think I've worked it out:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval old_role_name = mvindex('modifiedProperties{}.oldValue', mvfind('modifiedProperties{}.displayName', "Role\.DisplayName"))&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;modifiedProperties{}.oldValue&lt;/EM&gt; and &lt;EM&gt;modifiedProperties{}.displayName&lt;/EM&gt; are both multivalue fields.&amp;nbsp; I found the mv index number of&amp;nbsp;&lt;EM&gt;modifiedProperties{}.displayName&lt;/EM&gt; where the value is &lt;FONT color="#000000"&gt;&lt;STRONG&gt;Role.DisplayName&lt;/STRONG&gt;&lt;/FONT&gt; using&amp;nbsp;&lt;FONT color="#FF00FF"&gt;mvfind&lt;/FONT&gt;, then used that index number to extract the correct value from&amp;nbsp;&lt;EM&gt;modifiedProperties{}.oldValue&lt;/EM&gt;&amp;nbsp; into a new field&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;with &lt;FONT color="#FF00FF"&gt;mvindex&lt;/FONT&gt;.&lt;BR /&gt;&lt;BR /&gt;(The backslash in the second argument of&amp;nbsp;&lt;FONT color="#FF00FF"&gt;mvfind &lt;/FONT&gt;is because it's actually a regex, not a vanilla string).&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2022 08:52:33 GMT</pubDate>
    <dc:creator>chgota</dc:creator>
    <dc:date>2022-04-08T08:52:33Z</dc:date>
    <item>
      <title>How to set up a search to Retrieve Office 365 audit event property retrieval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-a-search-to-Retrieve-Office-365-audit-event/m-p/543773#M154039</link>
      <description>&lt;P&gt;I'm trying to set up a search to return Office 365 role change events for specific roles, such as the Global Administrator (aka Company Administrator).&amp;nbsp; The event data seems to be structured like this (simplified for clarity):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{ Id: &amp;lt;someGuid&amp;gt;
  ModifiedProperties: [
    {
      Name: Role.ObjectID
      NewValue: 
      OldValue: &amp;lt;someGuid&amp;gt;
    },
    {
      Name: Role.DisplayName
      NewValue: 
      OldValue: Company Administrator
    },
    {
      Name: Role.TemplateId
      NewValue: 
      OldValue: &amp;lt;someGuid&amp;gt;
    },
    {
      Name: Role.WellKnownObjectName
      NewValue: 
      OldValue: TenantAdmins
    }
  ]
  ObjectId: &amp;lt;UPN of object modified&amp;gt;
  Operation: &amp;lt;what was done&amp;gt;
  UserId: &amp;lt;UPN of user that made change
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to extract the value OldValue of ModifiedProperties object where Name = Role.DisplayName into a field.&amp;nbsp; I've had a look, and had thought either spath or eval would help, but I couldn't see any extra fields being created when I used either, much less being able to then extract data from it.&lt;/P&gt;
&lt;P&gt;Am I on the right track? Or looking at it all wrong?&amp;nbsp; My base search is this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sourcetype="o365:management:activity" AND RecordType=8 AND (ModifiedProperties{}.NewValue="TenantAdmins" OR ModifiedProperties{}.OldValue="TenantAdmins")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I then tried to push it through eval like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval 'ModifiedProperties{}.Name'='ModifiedProperties{}.OldValue'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought I understood that should have added 4 extra fields (to match the four ModifiedProperties objects) to the returned event, but the events didn't change.&lt;/P&gt;
&lt;P&gt;Can anyone lend a hand?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 14:27:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-a-search-to-Retrieve-Office-365-audit-event/m-p/543773#M154039</guid>
      <dc:creator>JohnMoeVita</dc:creator>
      <dc:date>2022-04-08T14:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Office 365 audit event property retrieval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-a-search-to-Retrieve-Office-365-audit-event/m-p/593078#M206436</link>
      <description>&lt;P&gt;I came across this post while trying to figure out how to solve the same issue, and I think I've worked it out:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval old_role_name = mvindex('modifiedProperties{}.oldValue', mvfind('modifiedProperties{}.displayName', "Role\.DisplayName"))&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;modifiedProperties{}.oldValue&lt;/EM&gt; and &lt;EM&gt;modifiedProperties{}.displayName&lt;/EM&gt; are both multivalue fields.&amp;nbsp; I found the mv index number of&amp;nbsp;&lt;EM&gt;modifiedProperties{}.displayName&lt;/EM&gt; where the value is &lt;FONT color="#000000"&gt;&lt;STRONG&gt;Role.DisplayName&lt;/STRONG&gt;&lt;/FONT&gt; using&amp;nbsp;&lt;FONT color="#FF00FF"&gt;mvfind&lt;/FONT&gt;, then used that index number to extract the correct value from&amp;nbsp;&lt;EM&gt;modifiedProperties{}.oldValue&lt;/EM&gt;&amp;nbsp; into a new field&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;with &lt;FONT color="#FF00FF"&gt;mvindex&lt;/FONT&gt;.&lt;BR /&gt;&lt;BR /&gt;(The backslash in the second argument of&amp;nbsp;&lt;FONT color="#FF00FF"&gt;mvfind &lt;/FONT&gt;is because it's actually a regex, not a vanilla string).&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 08:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-up-a-search-to-Retrieve-Office-365-audit-event/m-p/593078#M206436</guid>
      <dc:creator>chgota</dc:creator>
      <dc:date>2022-04-08T08:52:33Z</dc:date>
    </item>
  </channel>
</rss>

