<?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: XQL filter o365 attachments in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-filter-o365-attachments/m-p/556111#M5076</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/271703"&gt;@FabioFerreira&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for writing to live community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming type of the field which contains above value is json, could you try this below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;| alter attachment_id = arraymap(json_extract_array(to_json_string(fieldname),"$."),json_extract_scalar("@element","$.id"))&lt;BR /&gt;| arrayexpand attachment_id&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Please mark the response as "Accept as Solution" if it answers your query.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Regards.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 08:51:52 GMT</pubDate>
    <dc:creator>PiyushKohli</dc:creator>
    <dc:date>2023-09-01T08:51:52Z</dc:date>
    <item>
      <title>XQL filter o365 attachments</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-filter-o365-attachments/m-p/555990#M5066</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I am trying to filter o365 attachments without success, could you help pls&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;sample&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "@odata.type": "#microsoft.graph.fileAttachment",
    "@odata.mediaContentType": "image/jpeg",
    "id": "AAMkADEzYjJhMzM1LTY0ODctNGUxOS05ZDc5LTQ2MWM3NzFmMTRjOABGAAAAAABaN8y0q3IrQ6fyDga7Z5M3BwBvSXHDOoi0TJ5-l2B-i9PgAAAAAAEMAADyHfSb-T8wR5Fak3aFlfaBAACPB9PLAAABEgAQAE8kDtOZeABMuRd54VyYgc4=",
 },
  {
    "@odata.type": "#microsoft.graph.fileAttachment",
    "@odata.mediaContentType": "image/png",
    "id": "AAMkADEzYjJhMzM1LTY0ODctNGUxOS05ZDc5LTQ2MWM3NzFmMTRjOABGAAAAAABaN8y0q3IrQ6fyDga7Z5M3BwBvSXHDOoi0TJ5-l2B-i9PgAAAAAAEMAADyHfSb-T8wR5Fak3aFlfaBAACPB9PLAAABEgAQAI8pDv4IgY1BhJhVm9_2_E8=",
}
]&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;XQL&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;dataset = msft_o365_emails_raw |
| fields attachments as attach
| alter attachid = json_extract_scalar_array(to_json_string(arrayindex(attach, 0)) , "$.id")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Fabio Ferreira&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Aug 2023 11:21:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-filter-o365-attachments/m-p/555990#M5066</guid>
      <dc:creator>FabioFerreira</dc:creator>
      <dc:date>2023-08-31T11:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: XQL filter o365 attachments</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-filter-o365-attachments/m-p/556111#M5076</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/271703"&gt;@FabioFerreira&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for writing to live community!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming type of the field which contains above value is json, could you try this below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;| alter attachment_id = arraymap(json_extract_array(to_json_string(fieldname),"$."),json_extract_scalar("@element","$.id"))&lt;BR /&gt;| arrayexpand attachment_id&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Please mark the response as "Accept as Solution" if it answers your query.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 08:51:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-filter-o365-attachments/m-p/556111#M5076</guid>
      <dc:creator>PiyushKohli</dc:creator>
      <dc:date>2023-09-01T08:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: XQL filter o365 attachments</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-filter-o365-attachments/m-p/556372#M5081</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/276269"&gt;@PiyushKohli&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It worked!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 09:47:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-filter-o365-attachments/m-p/556372#M5081</guid>
      <dc:creator>SuporteDVT</dc:creator>
      <dc:date>2023-09-04T09:47:19Z</dc:date>
    </item>
  </channel>
</rss>

