Some users may experience issues accessing the case portal. For more information, please click here.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Last logged-on user not showing for Apple devices

Last logged-on user not showing for Apple devices

In versions of FlexNet Manager Suite before 2021 R1.4, Apple devices may show the user that is currently logged on rather than the last logged-on user in the Last logged on field of the Ownership tab (Inventory Device Properties > Ownership tab). If no user was logged onto the Apple device when it was inventoried, you'll see the user listed as "System."

last logged on.png

Read more about the Ownership tab.

Find the last logged-on user for Apple devices

If you are experiencing this issue, you can follow the instructions below to find the last logged-on user.

  1. Run the following query to determine the name of an Apple device that isn't showing when it was last logged on:
SELECT
ho.ComputerID AS ExternalID,
c.computercn,
LEFT(hv.Value, 250) AS LastLoggedOnUser
FROM dbo.HardwareObject AS ho
JOIN dbo.HardwareClass AS hc ON hc.HardwareClassID = ho.HardwareClassID
JOIN dbo.HardwareClass AS sc ON sc.HardwareClassID = hc.SuperClassID
JOIN dbo.HardwareValue AS hv ON hv.HardwareObjectID = ho.HardwareObjectID
JOIN dbo.HardwareProperty AS hp ON hp.HardwarePropertyID = hv.HardwarePropertyID
Join dbo.computer As C ON c.ComputerID = ho.ComputerID
WHERE sc.Class = 'CIM_UnitaryComputerSystem'
AND hp.Property = 'UserName'
AND hv.Value != 'SYSTEM'
and c.ComputerCN = <Name of Device>

This query will return something like the image below:

HollyM_1-1667580800918.png
warning yellow.pngImportant: All users should have a prefix of "Domain" followed by their username. If the user is displaying only the username and no domain, you will not be able to see the last logged-on user. This occurs when the matching script can't match a domain user to a local user. In this case, you must either assign the user on the ownership tab or get the user to log in as a domain account to see the last logged-on user.

 

  1. If the previous query yields no results, you can alter it to remove AND hv.Value != 'SYSTEM'. This query will show if the user is displaying as "system" due to not being logged on when inventory was run last.
SELECT
ho.ComputerID AS ExternalID,
c.computercn,
LEFT(hv.Value, 250) AS LastLoggedOnUser
FROM dbo.HardwareObject AS ho
JOIN dbo.HardwareClass AS hc ON hc.HardwareClassID = ho.HardwareClassID
JOIN dbo.HardwareClass AS sc ON sc.HardwareClassID = hc.SuperClassID
JOIN dbo.HardwareValue AS hv ON hv.HardwareObjectID = ho.HardwareObjectID
JOIN dbo.HardwareProperty AS hp ON hp.HardwarePropertyID = hv.HardwarePropertyID
Join dbo.computer As C ON c.ComputerID = ho.ComputerID
WHERE sc.Class = 'CIM_UnitaryComputerSystem'
AND hp.Property = 'UserName'
and c.ComputerCN = <Name of Device>
  1. If nothing is returned from these queries, you will need access to the NDI File. In the NDI file, look at the top block called MGS_ComputerSystem. You should see the username listed here.
mgs computer sys.png
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Nov 04, 2022 01:01 PM
Updated by:
Contributors