When you import data into a SharePoint list, duplicate items can appear unexpectedly. This problem often occurs because the import process does not check for existing records based on a unique identifier. The root cause is a mismatch between how SharePoint generates item IDs and how the import tool assigns them. This article explains why duplicates happen and provides a step-by-step method to remove them and prevent future occurrences.
Key Takeaways: How to Remove Duplicate List Items After Import
- SharePoint list ID column: The built-in ID field is not reliable for deduplication because it resets or conflicts during import.
- Power Automate flow with Group By: Use a scheduled flow to find and delete duplicate rows based on a custom unique column.
- Custom unique column (Title or Site Column): Create a column with enforced unique values to block duplicate entries at the source.
Why Duplicate Items Appear After Import
SharePoint lists use a system-generated ID column that increments automatically. When you import data using tools like Excel, Microsoft Access, or CSV import, the import process may assign new IDs instead of matching existing ones. This causes the same logical record to appear multiple times with different IDs. The root cause is that the import tool does not perform a lookup against existing data. It treats every row as a new item. If your list does not have a column with enforced unique values, there is no way for SharePoint to reject a duplicate row during import.
Another common cause is running the same import multiple times. Each run adds the same data again. Without a unique constraint, SharePoint accepts every row. The list grows with identical entries that differ only in the ID column. This behavior is by design: SharePoint lists are not databases with primary keys. You must design your import process to check for duplicates before adding items.
Steps to Find and Remove Duplicate List Items
- Identify the column that should be unique
Choose a column that naturally has unique values, such as an invoice number, employee ID, or product code. If your list does not have such a column, create a new site column of type Single line of text and set the Enforce unique values option to Yes. This prevents future duplicates but does not fix existing ones. - Export the list to Excel and locate duplicates
Open the list in SharePoint. Click Export to Excel. In Excel, use the Remove Duplicates feature on the Data tab. Select the column you identified in step 1. Excel will highlight which rows are duplicates. Make a note of the IDs of the duplicate rows you want to delete. - Delete duplicate items manually
Go back to the SharePoint list. Switch to Quick Edit view by clicking Edit in grid view. Sort the list by the unique column. Find the rows that match the duplicate IDs from Excel. Select each duplicate row and click Delete in the command bar. This method works for small lists with fewer than 100 duplicate items. - Use Power Automate for bulk deletion
Create a scheduled cloud flow in Power Automate. Set the trigger to Recurrence and run once daily. Add a SharePoint action called Get items. Use a filter query to find items where the unique column equals a specific value. Add a Apply to each loop. Inside the loop, add a Delete item action. Test the flow on a small set first. This method handles lists with hundreds or thousands of duplicates. - Verify the list is clean
After deletion, export the list again to Excel and run Remove Duplicates. The count should match the total number of items in the list. If duplicates remain, repeat the process with a different filter or adjust the unique column selection.
If Duplicates Still Appear After the Fix
Import tool does not honor unique column constraint
Some import tools, especially CSV import and Access export, ignore the Enforce unique values setting. They insert items directly into the content database without checking constraints. To fix this, switch to a tool that respects list settings. Use the built-in SharePoint Quick Edit grid to paste data. This method checks unique values in real time and rejects duplicates.
Power Automate flow deletes the wrong items
If your flow deletes all matching items including the first occurrence, you lose the original record. To avoid this, always keep the item with the lowest ID. In your flow, sort the items by ID ascending. Add a condition to skip the first item in the Apply to each loop. Only delete items that are not the first in the sorted list.
Unique column contains blank values
If your unique column has blank cells, SharePoint treats each blank as a unique value. This means duplicate blank rows will not be caught. Fill in blank cells with a placeholder like “N/A” before running the import. Alternatively, use a calculated column that combines multiple fields to create a composite unique value.
| Method | Manual Deletion | Power Automate |
|---|---|---|
| Best for | Fewer than 100 duplicates | 100 or more duplicates |
| Time required | 5 to 15 minutes | 10 to 20 minutes to set up |
| Risk of data loss | Low if you verify before deleting | Medium if flow logic is incorrect |
| Reusability | One-time only | Can be saved and reused |
You can now identify and remove duplicate list items after an import. Start by creating a unique column with enforced values to prevent future duplicates. For existing duplicates, use the manual deletion steps for small lists or the Power Automate flow for larger datasets. As an advanced tip, schedule the Power Automate flow to run weekly as a cleanup routine to catch duplicates before they accumulate.