Query Details
// Visualize the join type (Azure AD joined, Azure AD registered or Hybrid joined) of your MEM/Intune devices per week
// See here: https://github.com/reprise99/Sentinel-Queries/blob/main/Intune/IntuneDevices-VisualizeDeviceJoinTypebyWeek.kql
IntuneDevices
| where todatetime(LastContact) > ago (30d) // Filter only devices the have contacted Intune in the last 30 days
| summarize arg_max(TimeGenerated, *) by DeviceName, startofweek(TimeGenerated)
| where OS == "Windows"
| summarize JoinSummary=count()by JoinType, startofweek(TimeGenerated)
| where isnotempty(JoinType)
| render columnchart
with (
kind=unstacked,
ytitle="Device Count",
xtitle="Week",
title="Device Number by join type per week")
This query is designed to create a visual representation (specifically a column chart) of the different types of device join statuses (Azure AD joined, Azure AD registered or Hybrid joined) for devices managed by Microsoft Endpoint Manager (MEM) or Intune. The data is displayed on a weekly basis.
The query first filters out devices that have not contacted Intune in the last 30 days. Then, it further narrows down the data to only include devices running the Windows operating system. The chart displays the number of devices for each join type per week.

Ugur Koc
Released: July 11, 2022
Tables
Keywords
Operators