Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Query Assets for Attribute Label Duplicates

Scott Wright
Contributor
March 21, 2025

I have an Asset import for Windows devices.  In some cases, the key changes from the source, but the name of the asset (label) is the same.  The result is a duplicate asset.

Ex:

 

 Import Key(unique) ServerName(label) 
 001Server1  
 002Server1  

Although the source only has one record for server1, the import sees the object as new since the key is different, I end up having two objects for the same server in Assets.

I've tried setting attribute: ServerName as unique.  This causes the import to throw an error and keeps a stale record in Assets.

I'm in the process of testing if setting the Object type mapping for Missing objects to Remove.

 

Is there a way to use Azure Automation to search an object type for duplicate attributes and delete all but the most recent object?

1 answer

0 votes
Christopher Yen
Community Champion
March 23, 2025

Hi @Scott Wright ,

I would take a second look at the import job, I believe you can set ServerName as an identifier in your import attribute mapping even if it's not the unique ID in the table.

What error do you get in the audit log? Wondering if the error you are getting is because there are already duplicates, possibly doing a one time clean up using an export to sheets/excel to identify may fix the error?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events