unknown userresourceid values in v_usersprimarymachines

nick aquino 1 Reputation point Microsoft Employee
2020-12-08T16:00:25.573+00:00

SQL Query:

select distinct userresourceid from v_usersprimarymachines where userresourceid not in (select resourceid from v_r_user)

We have many results returned from this query. I am able to retrieve the information needed for my report using v_UserMachineRelationship; however, I am concerned that there are some tables/views that are not being cleaned up.

Does anyone have any idea how to trace why these bad user resourceids exist in this table or ultimately, why they're there and how to clean up?

Microsoft Configuration Manager
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. nick aquino 1 Reputation point Microsoft Employee
    2020-12-08T16:18:49.697+00:00

    Nevermind.... they're groups. Anyone know why a group would be in the relationship table?
    select distinct userresourceid from v_usersprimarymachines where userresourceid in (select resourceid from v_r_Usergroup)

    0 comments No comments

  2. AllenLiu-MSFT 43,061 Reputation points Microsoft Vendor
    2020-12-09T02:24:28.747+00:00

    @nick aquino
    Thank you for posting in Microsoft Q&A forum.
    Same result in my lab, user groups ResourceID also show in the view v_usersprimarymachines.
    So it indicates that the user groups where the primary users is located will be displayed in the results


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments