Populating Assigned To attribute in Computer CI for Agent Client Collector for Visibility - Content

  • Rversion finale: Australia
  • Mis à jour 12 mars 2026
  • 1 minute de lecture
  • To update the Assigned To attribute of the Computer CI, you need to collect information from the logged in user.

    Avant de commencer

    Role required: admin

    You can automatically populate Assigned to for Windows endpoint devices and macOS devices, like workstations or employee laptops, as part of agent-based Discovery using ACC-VC with the following system properties. See Available system properties for more information.
    • sn_acc_vis_content.set_assigned_to
    • sn_acc_vis_content.assigned_to_user_order
    • sn_acc_vis.column_name_for_user_mapping

    Procédure

    1. Create higher user privileges to fetch the logged in user details.
      Use Log on As Local System User instead of the default ServiceNow user for running the Agent Client Collector.

      These commands are executed on the Windows machine:

      • wmic COMPUTERSYSTEM GET USERNAME
      • From osquery: SELECT l.user FROM logged_in_users l JOIN users u ON l.sid = u.uuid WHERE u.type != 'special'

      This command is executed on the macOS machine: SELECT distinct(l.user) FROM logged_in_users l JOIN users u ON l.user = u.username

    2. User names match is performed on the user records in the sys_user table.
      The Assigned To attribute is populated and then it creates a reference to the user. Systems logs shows a warning if no user can be found in sys_user. The user names sourced for Assigned To attribute is based on the system property: sn_acc_vis_content.assigned_to_user_order.
    3. Assigned_to attribute is set based on priorities.
      If assigned_to is already there, keep it as is by default. However, you can update the sn_acc_vis_content.set_assigned_to system property to override it. If there are any Reconciliation Rules defined, then the IRE populates the field accordingly.

    Résultats

    No new user account is created in the sys_user table. Instead, the existing user is queryied and the same is referenced as Assigned To user for a CI.