<?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 Adding dynamic groups to XQL output? in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250720#M9207</link>
    <description>&lt;P&gt;Looking to add the dynamic groups assigned to endpoints as a field in an XQL query. Here is what I have right now below. I'm unable to figure out if there is a way to get the dynamic group names in there. That would help us find machines easier than using the GUI method as this is a single report instead of trying to combine multiple exports due to versioning. Right now its export this, then export full endpoints database and then carry over the group column with a diff-merge, would be nice to do it all at once.&lt;BR /&gt;&lt;BR /&gt;config case_sensitive = false&lt;BR /&gt;| dataset = host_inventory&lt;BR /&gt;| filter applications != null&lt;BR /&gt;| arrayexpand applications&lt;BR /&gt;| alter applicationName = applications -&amp;gt; application_name&lt;BR /&gt;| filter applicationName contains "TargetApplication"&lt;BR /&gt;| alter applicationVersion = applications -&amp;gt; version&lt;BR /&gt;| alter version_1major = to_integer(arrayindex(split(applicationVersion, "."),0))&lt;BR /&gt;| alter version_2minor = to_integer(arrayindex(split(applicationVersion, "."),1))&lt;BR /&gt;| alter version_3patch = to_integer(arrayindex(split(applicationVersion, "."),2))&lt;BR /&gt;| alter version_4hotfix = to_integer(arrayindex(split(applicationVersion, "."),3))&lt;BR /&gt;| fields applicationName, applicationVersion, ip_addresses, host_name, version_*, applications&lt;BR /&gt;| dedup host_name&lt;BR /&gt;&lt;BR /&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2026 13:18:23 GMT</pubDate>
    <dc:creator>J.Suter</dc:creator>
    <dc:date>2026-03-23T13:18:23Z</dc:date>
    <item>
      <title>Adding dynamic groups to XQL output?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250720#M9207</link>
      <description>&lt;P&gt;Looking to add the dynamic groups assigned to endpoints as a field in an XQL query. Here is what I have right now below. I'm unable to figure out if there is a way to get the dynamic group names in there. That would help us find machines easier than using the GUI method as this is a single report instead of trying to combine multiple exports due to versioning. Right now its export this, then export full endpoints database and then carry over the group column with a diff-merge, would be nice to do it all at once.&lt;BR /&gt;&lt;BR /&gt;config case_sensitive = false&lt;BR /&gt;| dataset = host_inventory&lt;BR /&gt;| filter applications != null&lt;BR /&gt;| arrayexpand applications&lt;BR /&gt;| alter applicationName = applications -&amp;gt; application_name&lt;BR /&gt;| filter applicationName contains "TargetApplication"&lt;BR /&gt;| alter applicationVersion = applications -&amp;gt; version&lt;BR /&gt;| alter version_1major = to_integer(arrayindex(split(applicationVersion, "."),0))&lt;BR /&gt;| alter version_2minor = to_integer(arrayindex(split(applicationVersion, "."),1))&lt;BR /&gt;| alter version_3patch = to_integer(arrayindex(split(applicationVersion, "."),2))&lt;BR /&gt;| alter version_4hotfix = to_integer(arrayindex(split(applicationVersion, "."),3))&lt;BR /&gt;| fields applicationName, applicationVersion, ip_addresses, host_name, version_*, applications&lt;BR /&gt;| dedup host_name&lt;BR /&gt;&lt;BR /&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 13:18:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250720#M9207</guid>
      <dc:creator>J.Suter</dc:creator>
      <dc:date>2026-03-23T13:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dynamic groups to XQL output?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250724#M9208</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/816046735"&gt;@J.Suter&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greetings for the day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-end="147" data-start="0"&gt;Yes, you can include both dynamic and static group names assigned to endpoints by joining your &lt;CODE data-end="111" data-start="95"&gt;host_inventory&lt;/CODE&gt; query with the &lt;CODE data-end="138" data-start="127"&gt;endpoints&lt;/CODE&gt; dataset.&lt;/P&gt;
&lt;P data-end="147" data-start="0"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-end="354" data-start="149"&gt;In Cortex XDR/XSIAM, endpoint group membership is stored in the &lt;CODE data-end="226" data-start="213"&gt;group_names&lt;/CODE&gt; field within the &lt;CODE data-end="255" data-start="244"&gt;endpoints&lt;/CODE&gt; dataset. This field is an array, since an endpoint can belong to multiple groups at the same time.&lt;/P&gt;
&lt;P data-end="507" data-start="356"&gt;To incorporate this into your report, you can use a &lt;CODE data-end="414" data-start="408"&gt;join&lt;/CODE&gt; stage. The most reliable join key between &lt;CODE data-end="473" data-start="457"&gt;host_inventory&lt;/CODE&gt; and &lt;CODE data-end="489" data-start="478"&gt;endpoints&lt;/CODE&gt; is &lt;CODE data-end="506" data-start="493"&gt;endpoint_id&lt;/CODE&gt;.&lt;/P&gt;
&lt;P data-end="507" data-start="356"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-end="536" data-start="509"&gt;Here is your updated query:&lt;/P&gt;
&lt;P data-end="536" data-start="509"&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="relative w-full mt-4 mb-1"&gt;
&lt;DIV class=""&gt;
&lt;DIV class="relative"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"&gt;
&lt;DIV class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"&gt;
&lt;DIV class="pe-11 pt-3"&gt;
&lt;DIV class="relative z-0 flex max-w-full"&gt;
&lt;DIV id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj" dir="ltr"&gt;
&lt;DIV class="cm-scroller"&gt;
&lt;DIV class="cm-content q9tKkq_readonly"&gt;&lt;SPAN&gt;config case_sensitive = false&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| dataset = host_inventory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter applications != null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| arrayexpand applications&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter applicationName = applications -&amp;gt; application_name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| filter applicationName contains "TargetApplication"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter applicationVersion = applications -&amp;gt; version&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Join with the endpoints dataset to retrieve group names&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| join type = left (dataset = endpoints | fields endpoint_id, group_names) as ep ep.endpoint_id = endpoint_id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter version_1major = to_integer(arrayindex(split(applicationVersion, "."),0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter version_2minor = to_integer(arrayindex(split(applicationVersion, "."),1))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter version_3patch = to_integer(arrayindex(split(applicationVersion, "."),2))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| alter version_4hotfix = to_integer(arrayindex(split(applicationVersion, "."),3))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Include the group_names from the joined table (aliased as ep)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields applicationName, applicationVersion, ip_addresses, host_name, version_*, ep.group_names&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| dedup host_name&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;H4 data-end="1527" data-start="1505" data-section-id="nh41x0"&gt;Key Considerations:&lt;/H4&gt;
&lt;UL data-end="2054" data-start="1529"&gt;
&lt;LI data-end="1689" data-start="1529" data-section-id="7jco30"&gt;
&lt;P data-end="1626" data-start="1531"&gt;&lt;STRONG data-end="1545" data-start="1531"&gt;Field Type&lt;/STRONG&gt;:&lt;BR data-end="1549" data-start="1546" /&gt;&lt;CODE data-end="1564" data-start="1551"&gt;group_names&lt;/CODE&gt; is an array. If you want to filter for a specific group, use:&lt;/P&gt;
&lt;DIV class="relative w-full mt-4 mb-1"&gt;
&lt;DIV class=""&gt;
&lt;DIV class="relative"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"&gt;
&lt;DIV class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"&gt;
&lt;DIV class="pe-11 pt-3"&gt;
&lt;DIV class="relative z-0 flex max-w-full"&gt;
&lt;DIV id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj" dir="ltr"&gt;
&lt;DIV class="cm-scroller"&gt;
&lt;DIV class="cm-content q9tKkq_readonly"&gt;&lt;SPAN&gt;| filter ep.group_names contains "YourGroupName"&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI data-end="1905" data-start="1691" data-section-id="6pioxi"&gt;&lt;STRONG data-end="1709" data-start="1693"&gt;Data Latency&lt;/STRONG&gt;:&lt;BR data-end="1713" data-start="1710" /&gt;The &lt;CODE data-end="1730" data-start="1719"&gt;endpoints&lt;/CODE&gt; dataset is typically updated about once per hour. This can cause slight differences between the “All Endpoints” UI and XQL results if group assignments were recently changed.&lt;/LI&gt;
&lt;LI data-end="2054" data-start="1907" data-section-id="1o490ce"&gt;
&lt;P data-end="1993" data-start="1909"&gt;&lt;STRONG data-end="1931" data-start="1909"&gt;Alternative Format&lt;/STRONG&gt;:&lt;BR data-end="1935" data-start="1932" /&gt;If you want each group to appear as a separate row, add:&lt;/P&gt;
&lt;DIV class="relative w-full mt-4 mb-1"&gt;
&lt;DIV class=""&gt;
&lt;DIV class="relative"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="h-full min-h-0 min-w-0"&gt;
&lt;DIV class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"&gt;
&lt;DIV class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"&gt;
&lt;DIV class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="pe-11 pt-3"&gt;
&lt;DIV class="relative z-0 flex max-w-full"&gt;
&lt;DIV id="code-block-viewer" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj" dir="ltr"&gt;
&lt;DIV class="cm-scroller"&gt;
&lt;DIV class="cm-content q9tKkq_readonly"&gt;&lt;SPAN&gt;| arrayexpand ep.group_names&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-end="2054" data-start="2039"&gt;after the join.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If you feel this has answered your query, please let us know by clicking like and on&amp;nbsp;&lt;STRONG&gt;"mark this as a Solution".&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;S. Subashkar Sekar&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 14:11:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250724#M9208</guid>
      <dc:creator>susekar</dc:creator>
      <dc:date>2026-03-23T14:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dynamic groups to XQL output?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250727#M9211</link>
      <description>&lt;P&gt;It looks like it should work but throws errors:&lt;BR /&gt;&lt;BR /&gt;Line #9 "endpoint.id is not a valid value"&lt;BR /&gt;Line #15 "ep.group_names is not a valid value"&lt;BR /&gt;&lt;BR /&gt;I tried massaging it a little to get it to work and nothing, didnt know you can join datasets. If we can get this working this is the solution.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 14:35:32 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250727#M9211</guid>
      <dc:creator>J.Suter</dc:creator>
      <dc:date>2026-03-23T14:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dynamic groups to XQL output?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250740#M9213</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/816046735"&gt;@J.Suter&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="isSelectedEnd"&gt;&lt;SPAN&gt;I recommend reaching out to your Account Team, Solution Consultant, or Sales Engineer. They will be able to assist you in constructing the XQL query based on your specific requirements.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you feel this has answered your query, please let us know by clicking like and on&amp;nbsp;&lt;STRONG&gt;"mark this as a Solution".&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;S. Subashkar Sekar&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 18:15:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/adding-dynamic-groups-to-xql-output/m-p/1250740#M9213</guid>
      <dc:creator>susekar</dc:creator>
      <dc:date>2026-03-23T18:15:28Z</dc:date>
    </item>
  </channel>
</rss>

