‎10-01-2019 10:47 AM
‎10-08-2019 11:19 AM
Select Top 1000000 'arrow_refresh.png' As Icon,
Case
When tblIntuneDevice.ManagedDeviceName Is Null Then
tblO365ActiveSyncDevice.DeviceFriendlyName
Else tblIntuneDevice.ManagedDeviceName
End As DeviceAssetName,
tblIntuneDevice.AssetId As DeviceAssetId,
tblO365ActiveSyncDevice.DeviceModel,
tblO365ActiveSyncDevice.DeviceOs,
tblO365ActiveSyncDevice.ClientType,
tblO365ActiveSyncDevice.DeviceAccessState As AccessState,
tblO365ActiveSyncDevice.FirstSyncTime,
tblO365ActiveSyncDevice.LastSuccessSync,
tblO365User.DisplayName,
tblO365User.UserPrincipalName,
tblADusers.Username,
tblADusers.Userdomain,
tblO365Organization.DisplayName As Organization,
tblO365Organization.TenantId,
tblIntuneDevice.UserId
From tblO365ActiveSyncDevice
Inner Join tblO365Organization On tblO365Organization.OrganizationId =
tblO365ActiveSyncDevice.OrganizationId
Left Outer Join tblIntuneDevice On tblIntuneDevice.Imei =
tblO365ActiveSyncDevice.DeviceImei
Inner Join tblO365User On tblO365Organization.OrganizationId =
tblO365User.OrganizationId
Left Join tblADusers On tblADusers.UPN = tblO365User.UserPrincipalName
Order By DeviceAssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now