Primary user is missing from the report

RASH MAAR 421 Reputation points
2020-12-31T10:11:33.727+00:00

Hi,

When I run the "Hardware 03A - Primary computer users" report or another report I created and need to give me the Primary users of the devices, some users are missing in the report even though they appear in the console.

For example, this is the query of the report I created:

SELECT       
    CS.Manufacturer0,
    CS.Model0,
    CS.Name0,
    CS.UserName0,
    BIOS.SerialNumber0
FROM
    dbo.v_R_System_Valid RV
    Inner join dbo.v_GS_COMPUTER_SYSTEM CS on RV.ResourceID = CS.ResourceID
    Inner JOIN dbo.v_GS_PC_BIOS BIOS on RV.ResourceID = BIOS.ResourceID
    Inner join dbo.v_FullCollectionMembership FCM on RV.ResourceID = FCM.ResourceID
    inner join dbo.v_Collection Coll on Coll.CollectionID = FCM.CollectionID
Where
    fcm.CollectionID in (@CollectionID)

In a report, the primary user is missing about a third of the devices. In the SCCM console the primary user appears correctly.

What could be the cause of this and how to fix it?

Thanks for the help

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Garth Jones 2,076 Reputation points
    2020-12-31T13:20:00.62+00:00

    Your query will NOT give you primary user, it will give you last logon user. These blogs will help you add the right user details to your query.

    https://www.enhansoft.com/where-to-find-user-name-data-within-configuration-manager-part-1/

    and
    https://www.enhansoft.com/where-to-find-user-name-data-within-configuration-manager-part-2/

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Garth Jones 2,076 Reputation points
    2020-12-31T13:21:24.15+00:00

    As for Primary user not populating make sure that AI and Audit options have been enabled. these blog will help with that.

    https://www.enhansoft.com/how-to-setup-configure-and-use-sccms-asset-intelligence/
    and
    https://www.enhansoft.com/enable-workstation-logon-audit-policy-in-order-to-collect-top-console-user-details/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.