The field tblADComputers.ManagerADObjectId
stores the Object ID (GUID) of the manager in Active Directory, which is usually a user, not a group. In your case, since you're assigning ownership to an AD security group, this creates a mismatch ā Lansweeper expects a user reference but you've set a group.
To resolve or work around this, here are your options:
If the AD group youāve assigned as "Manager" is synced into Lansweeper (i.e., it exists in tblADObjects
), you can try joining tblADComputers.ManagerADObjectId
to tblADObjects.ADObjectID
like this:
Left Join tblADObjects As mgrObj On tblADComputers.ManagerADObjectId = mgrObj.ADObjectID
Then in your SELECT:
mgrObj.Displayname As [Server Owner]
Update your current SELECT line:
tblADComputers.ManagerADObjectId As [Server Owner],
to:
mgrObj.Displayname As [Server Owner],
Second Option:
Since AD's manager
field is designed for user objects, not groups, itās better to use Lansweeperās Custom fields or Comments to store the server owner info if it's a group.
Add a custom field (e.g., AssetOwner
) using:
Go to Asset Management > Assets > Edit Asset > Custom Fields.
Use one of the 20 available custom fields like Custom1
, and repurpose it as āServer Ownerā.
Modify your report to include:
tblAssetCustom.Custom1 As [Server Owner]
This avoids the GUID lookup entirely and allows you to store any string (group name, email, etc.).
Updated report to test:
Select Top (1000000)
tsysOS.Image As icon,
tblAssets.AssetID,
tblADComputers.IsEnabled As Enabled,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
-- Option 1: Resolve ManagerADObjectId to Display Name (works if group/user is synced)
mgrObj.Displayname As [Server Owner from AD],
-- Option 2: Use Custom Field for server owner name or group (manually set)
tblAssetCustom.Custom1 As [Server Owner (Custom)],
tblADComputers.Description As Description,
tblAssetCustom.Model,
tsysIPLocations.IPLocation,
tsysOS.OSname As OS,
tblAssets.Firstseen As [Created at],
tblAssets.Lastseen As [Last successful scan],
tblADObjects.ADObjectID
From tblComputersystem
Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblOperatingsystem On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblADObjects On tblADObjects.ADObjectID = tblADComputers.ADObjectID
-- Join to resolve ManagerADObjectId to a readable name
Left Join tblADObjects As mgrObj On tblADComputers.ManagerADObjectId = mgrObj.ADObjectID
Where tblComputersystem.Domainrole > 1
And tblAssetCustom.State = 1
Order By tblAssets.AssetName
------------------------------------------------
Union Home Mortgage's "Lansweeper Guy"
------------------------------------------------