{"id":30235,"date":"2024-12-05T05:59:00","date_gmt":"2024-12-05T05:59:00","guid":{"rendered":"https:\/\/endusersupports.com\/?p=30235"},"modified":"2025-04-15T19:26:49","modified_gmt":"2025-04-15T19:26:49","slug":"device-query-in-intune","status":"publish","type":"post","link":"https:\/\/endusersupports.com\/index.php\/2024\/12\/05\/device-query-in-intune\/","title":{"rendered":"Device Query in Intune- Single Device"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"30235\" class=\"elementor elementor-30235\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-dacfadd elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"dacfadd\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9bbad63\" data-id=\"9bbad63\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5c23303 elementor-widget elementor-widget-text-editor\" data-id=\"5c23303\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong><span style=\"color: #ffffff;\">How to Use Device Query in Intune<\/span><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c014800 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c014800\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1371471\" data-id=\"1371471\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-684b937 elementor-widget elementor-widget-text-editor\" data-id=\"684b937\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Device Query will help you to collect the n-demand device information\u00a0 quickly. Device query runs in a real-time and will provide real-time data from the device.\u00a0<\/p><h3>Prerequisites<\/h3><p>Microsoft Intune Advanced Analytics should be activated on Tenant You should have below license to use Device Query feature.<\/p><ul><li>Intune Advanced Analytics Add-on.<\/li><li>Microsoft Intune Suite.<\/li><\/ul><blockquote><p>To use Device query on a device, the device must be enrolled in Endpoint Analytics.\u00a0<\/p><\/blockquote><p>To use Device Query, Go to <strong>Devices <\/strong>and then<strong> All Devices <\/strong>then search<strong> device <\/strong>then click on<strong> Device Query\u00a0<\/strong>as showing in below screen.<\/p><p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-30243\" src=\"http:\/\/endusersupports.com\/wp-content\/uploads\/2024\/02\/Intune_Device-Query.png\" alt=\"\" width=\"1887\" height=\"844\" srcset=\"https:\/\/endusersupports.com\/wp-content\/uploads\/2024\/02\/Intune_Device-Query.png 1887w, https:\/\/endusersupports.com\/wp-content\/uploads\/2024\/02\/Intune_Device-Query-300x134.png 300w, https:\/\/endusersupports.com\/wp-content\/uploads\/2024\/02\/Intune_Device-Query-1024x458.png 1024w, https:\/\/endusersupports.com\/wp-content\/uploads\/2024\/02\/Intune_Device-Query-768x344.png 768w, https:\/\/endusersupports.com\/wp-content\/uploads\/2024\/02\/Intune_Device-Query-1536x687.png 1536w\" sizes=\"(max-width: 1887px) 100vw, 1887px\" \/><\/p><hr \/><h3 id=\"supported-properties\" class=\"heading-anchor\">Supported Properties<\/h3><p>Device query supports the following entities. To learn more about what properties are supported for each entity, see\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/mem\/analytics\/data-platform-schema\" data-linktype=\"relative-path\">Intune Data Platform Schema<\/a>.<\/p><ul><li><p>BiosInfo<\/p><\/li><li><p>Certificate<\/p><\/li><li><p>Cpu<\/p><\/li><li><p>DiskDrive<\/p><\/li><li><p>EncryptableVolume<\/p><\/li><li><p>FileInfo<\/p><\/li><li><p>LocalGroup<\/p><\/li><li><p>LocalUserAccount<\/p><\/li><li><p>LogicalDrive<\/p><\/li><li><p>MemoryInfo<\/p><\/li><li><p>OsVersion<\/p><\/li><li><p>Process<\/p><\/li><li><p>SystemEnclosure<\/p><\/li><li><p>SystemInfo<\/p><\/li><li><p>Tpm<\/p><\/li><li><p>WindowsAppCrashEvent<\/p><\/li><li><p>WindowsDriver<\/p><\/li><li><p>WindowsEvent<\/p><\/li><li><p>WindowsQfe<\/p><\/li><li><p>WindowsRegistry<\/p><\/li><li><p>WindowsService<\/p><\/li><\/ul><hr \/><h3 id=\"table-operators\" class=\"heading-anchor\">Table Operators<\/h3><p>Table operators can be used filter, summarize, and transform data streams. Currently the following operators are supported:<\/p><table style=\"height: 442px;\" width=\"509\" aria-label=\"Table 1\"><tbody><tr><td width=\"123\"><strong><span style=\"color: #0000ff;\">Operators<\/span><\/strong><\/td><td width=\"410\"><strong><span style=\"color: #0000ff;\">Description<\/span><\/strong><\/td><\/tr><tr><td width=\"123\">count<\/td><td width=\"410\">Returns a table with a single record containing the number of records<\/td><\/tr><tr><td width=\"123\">distinct<\/td><td width=\"410\">Produces a table with the distinct combination of the provided columns of the input table<\/td><\/tr><tr><td width=\"123\">join<\/td><td width=\"410\">Merge the rows of two tables to form a new table by matching row for the same device<\/td><\/tr><tr><td width=\"123\">order by<\/td><td width=\"410\">Sort the rows of the input table into order by one or more columns<\/td><\/tr><tr><td width=\"123\">project<\/td><td width=\"410\">Select the columns to include, rename or drop, and insert new computed columns<\/td><\/tr><tr><td width=\"123\">take<\/td><td width=\"410\">Return up to the specified number of rows<\/td><\/tr><tr><td width=\"123\">top<\/td><td width=\"410\">Returns the first N records sorted by the specified columns<\/td><\/tr><tr><td width=\"123\">where<\/td><td width=\"410\">Filters a table to the subset of rows that satisfy a predicate<\/td><\/tr><\/tbody><\/table><hr \/><h3 id=\"scalar-operators\" class=\"heading-anchor\">Scalar operators\u00a0<\/h3><p>The following table summarizes operators:<\/p><table width=\"512\" aria-label=\"Table 2\"><tbody><tr><td width=\"79\"><span style=\"color: #3366ff;\"><strong>Operators<\/strong><\/span><\/td><td width=\"276\"><span style=\"color: #3366ff;\"><strong>Description<\/strong><\/span><\/td><td width=\"157\"><span style=\"color: #3366ff;\"><strong>Example<\/strong><\/span><\/td><\/tr><tr><td width=\"79\">==<\/td><td width=\"276\">Equal<\/td><td width=\"157\">1 == 1, &#8216;aBc&#8217; == &#8216;AbC&#8217;<\/td><\/tr><tr><td width=\"79\">!=<\/td><td width=\"276\">Not Equal<\/td><td width=\"157\">1 != 2, &#8216;abc&#8217; != &#8216;abcd&#8217;<\/td><\/tr><tr><td width=\"79\">&lt;<\/td><td width=\"276\">Less<\/td><td width=\"157\">1 &lt; 2, &#8216;abc&#8217; &lt; &#8216;DEF&#8217;<\/td><\/tr><tr><td width=\"79\">&gt;<\/td><td width=\"276\">Greater<\/td><td width=\"157\">2 &gt; 1, &#8216;xyz&#8217; &gt; &#8216;XYZ&#8217;<\/td><\/tr><tr><td width=\"79\">&lt;=<\/td><td width=\"276\">Less or Equal<\/td><td width=\"157\">1 &lt;= 2, &#8216;abc&#8217; &lt;= &#8216;abc&#8217;<\/td><\/tr><tr><td width=\"79\">&gt;=<\/td><td width=\"276\">Greater or Equal<\/td><td width=\"157\">2 &gt;= 1, &#8216;abc&#8217; &gt;= &#8216;ABC&#8217;<\/td><\/tr><tr><td width=\"79\">+<\/td><td width=\"276\">Add<\/td><td width=\"157\">2 + 1, now() + 1d<\/td><\/tr><tr><td width=\"79\">&#8211;<\/td><td width=\"276\">Subtract<\/td><td width=\"157\">2 &#8211; 1, now() &#8211; 1h<\/td><\/tr><tr><td width=\"79\">*<\/td><td width=\"276\">Multiply<\/td><td width=\"157\">2 * 2<\/td><\/tr><tr><td width=\"79\">\/<\/td><td width=\"276\">Divide<\/td><td width=\"157\">02-Jan<\/td><\/tr><tr><td width=\"79\">%<\/td><td width=\"276\">Modulo<\/td><td width=\"157\">2 % 1<\/td><\/tr><tr><td width=\"79\">like<\/td><td width=\"276\">Left Hand Side (LHS) contains a match for Right Hand Side (RHS)<\/td><td width=\"157\">&#8216;abc&#8217; like &#8216;%B%&#8217;<\/td><\/tr><tr><td width=\"79\">!like<\/td><td width=\"276\">LHS doesn&#8217;t contain a match for RHS<\/td><td width=\"157\">&#8216;abc&#8217; !like &#8216;_d_&#8217;<\/td><\/tr><tr><td width=\"79\">contains<\/td><td width=\"276\">RHS occurs as a subsequence of LHS<\/td><td width=\"157\">&#8216;abc&#8217; contains &#8216;b&#8217;<\/td><\/tr><tr><td width=\"79\">!contains<\/td><td width=\"276\">RHS doesn&#8217;t occur in LHS<\/td><td width=\"157\">&#8216;team&#8217; !contains &#8216;i&#8217;<\/td><\/tr><tr><td width=\"79\">startswith<\/td><td width=\"276\">RHS is an initial subsequence of LHS<\/td><td width=\"157\">&#8216;team&#8217; startswith &#8216;tea&#8217;<\/td><\/tr><tr><td width=\"79\">!startswith<\/td><td width=\"276\">RHS isn&#8217;t an initial subsequence of LHS<\/td><td width=\"157\">&#8216;abc&#8217; !startswith &#8216;bc&#8217;<\/td><\/tr><tr><td width=\"79\">endswith<\/td><td width=\"276\">RHS is a closing subsequence of LHS<\/td><td width=\"157\">&#8216;abc&#8217; endswith &#8216;bc&#8217;<\/td><\/tr><tr><td width=\"79\">!endswith<\/td><td width=\"276\">RHS isn&#8217;t a closing subsequence of LHS<\/td><td width=\"157\">&#8216;abc&#8217; !endswith &#8216;a&#8217;<\/td><\/tr><tr><td width=\"79\">and<\/td><td width=\"276\">True if and only if RHS and LHS are true<\/td><td width=\"157\">(1 == 1) and (2 == 2)<\/td><\/tr><tr><td width=\"79\">or<\/td><td width=\"276\">True if and only if RHS or LHS is true<\/td><td width=\"157\">(1 == 1) or (1 == 2)<\/td><\/tr><\/tbody><\/table><hr \/><h3 id=\"aggregation-functions\" class=\"heading-anchor\">Aggregation functions<\/h3><p>Aggregation functions can be used with the summarize table operator to calculate summarized values. Currently the following aggregation functions are supported:<\/p><div class=\"buttons buttons-right margin-bottom-none margin-top-sm\">\u00a0<\/div><table width=\"525\" aria-label=\"Table 3\"><tbody><tr><td width=\"83\"><span style=\"color: #3366ff;\"><strong>Function<\/strong><\/span><\/td><td width=\"442\"><span style=\"color: #3366ff;\"><strong>Description<\/strong><\/span><\/td><\/tr><tr><td width=\"83\">avg()<\/td><td width=\"442\">Returns the average of the values across the group<\/td><\/tr><tr><td width=\"83\">count()<\/td><td width=\"442\">Returns a count of the records per summarization group<\/td><\/tr><tr><td width=\"83\">countif()<\/td><td width=\"442\">Returns a count of rows for which Predicate evaluates to true<\/td><\/tr><tr><td width=\"83\">dcount()<\/td><td width=\"442\">Returns the number of distinct values in the group<\/td><\/tr><tr><td width=\"83\">max()<\/td><td width=\"442\">Returns the maximum value across the group<\/td><\/tr><tr><td rowspan=\"3\" width=\"83\">maxif()<\/td><td width=\"442\"><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/data-explorer\/kusto\/query\/maxif-aggfunction\" data-linktype=\"absolute-path\">Starting in version 2107, you can use\u00a0maxif\u00a0with the summarize table operator.<\/a><\/td><\/tr><tr><td width=\"442\">\u00a0<\/td><\/tr><tr><td width=\"442\">Returns the maximum value across the group for which\u00a0Predicate\u00a0evaluates to\u00a0true.<\/td><\/tr><tr><td width=\"83\">min()<\/td><td width=\"442\">Returns the minimum value across the group<\/td><\/tr><tr><td rowspan=\"3\" width=\"83\">minif()<\/td><td width=\"442\"><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/data-explorer\/kusto\/query\/minif-aggfunction\" data-linktype=\"absolute-path\">Starting in version 2107, you can use\u00a0minif\u00a0with the summarize table operator.<\/a><\/td><\/tr><tr><td width=\"442\">\u00a0<\/td><\/tr><tr><td width=\"442\">Returns the minimum value across the group for which\u00a0Predicate\u00a0evaluates to\u00a0true.<\/td><\/tr><tr><td width=\"83\">percentile()<\/td><td width=\"442\">Returns an estimate for the specified nearest-rank percentile of the population defined by Expr<\/td><\/tr><tr><td width=\"83\">sum()<\/td><td width=\"442\">Returns the sum of the values across the group<\/td><\/tr><tr><td width=\"83\">sumif()<\/td><td width=\"442\">Returns a sum of Expr for which Predicate evaluates to true<\/td><\/tr><\/tbody><\/table><hr \/><h3 id=\"scalar-functions\" class=\"heading-anchor\">Scalar functions<\/h3><p>Scalar functions can be used in expressions. Currently the following scalar functions are supported:<\/p><table width=\"674\" aria-label=\"Table 4\"><tbody><tr><td width=\"138\"><span style=\"color: #3366ff;\"><strong>Function<\/strong><\/span><\/td><td width=\"536\"><span style=\"color: #3366ff;\"><strong>Description<\/strong><\/span><\/td><\/tr><tr><td width=\"138\">ago()<\/td><td width=\"536\">Subtracts the given timespan from the current UTC clock time<\/td><\/tr><tr><td width=\"138\">bin()<\/td><td width=\"536\">Rounds values down to many datetime multiple of a given bin size<\/td><\/tr><tr><td width=\"138\">case()<\/td><td width=\"536\">Evaluates a list of predicates and returns the first result expression whose predicate is satisfied<\/td><\/tr><tr><td width=\"138\">datetime_add()<\/td><td width=\"536\">Calculates a new datetime from a specified datepart multiplied by a specified amount, added to a specified datetime<\/td><\/tr><tr><td width=\"138\">datetime_diff()<\/td><td width=\"536\">Calculates the difference between two date time values<\/td><\/tr><tr><td width=\"138\">iif()<\/td><td width=\"536\">Evaluates the first argument and returns the value of either the second or third arguments depending on whether the predicate evaluated to true (second) or false (third)<\/td><\/tr><tr><td width=\"138\">indexof()<\/td><td width=\"536\">Function reports the zero-based index of the first occurrence of a specified string within input string<\/td><\/tr><tr><td width=\"138\">isnotnull()<\/td><td width=\"536\">Evaluates its sole argument and returns a Boolean value indicating if the argument evaluates to a non-null value<\/td><\/tr><tr><td width=\"138\">isnull()<\/td><td width=\"536\">Evaluates its sole argument and returns a Boolean value indicating if the argument evaluates to a null value<\/td><\/tr><tr><td width=\"138\">now()<\/td><td width=\"536\">Returns the current UTC clock time<\/td><\/tr><tr><td width=\"138\">strcat()<\/td><td width=\"536\">Concatenates between 1 and 64 arguments<\/td><\/tr><tr><td width=\"138\">strlen()<\/td><td width=\"536\">Returns the length, in characters, of the input string<\/td><\/tr><tr><td width=\"138\">substring()<\/td><td width=\"536\">Extracts a substring from a source string starting from some index to the end of the string<\/td><\/tr><tr><td width=\"138\">tostring()<\/td><td width=\"536\">Converts input to a string representation<\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>How to Use Device Query in Intune Device Query will help you to collect the n-demand device information\u00a0 quickly. Device query runs in a real-time and will provide real-time data from the device.\u00a0 Prerequisites Microsoft Intune Advanced Analytics should be activated on Tenant You should have below license to use Device Query feature. Intune Advanced [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":30257,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-30235","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mem"],"views":704,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/posts\/30235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/comments?post=30235"}],"version-history":[{"count":26,"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/posts\/30235\/revisions"}],"predecessor-version":[{"id":30629,"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/posts\/30235\/revisions\/30629"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/media\/30257"}],"wp:attachment":[{"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/media?parent=30235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/categories?post=30235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/endusersupports.com\/index.php\/wp-json\/wp\/v2\/tags?post=30235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}