web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Delete Existing Duplicate Contacts in Contact Entity

(1) ShareShare
ReportReport
Posted on by 140
Dear All,
 
I am very new to Dynamics 365 Sales, and I have task to complete on Duplicate rows deletion.
We have uploaded some data via Excel sheet, and we identified there are huge number of duplicate rows in existing contact entity, And we want to write Microsoft Flow to delete the duplicate rows.
 
Can anyone please help me in knowing how we can make it.
 
Regards,
Ali.
I have the same question (0)
  • Inogic Profile Picture
    651 on at
    Delete Existing Duplicate Contacts in Contact Entity
    Hi Ali,
    It seems like you're dealing with a large number of duplicate records and want to delete them in bulk.
    To delete duplicate rows in the Contact entity of Dynamics 365 Sales using Power Automate, start by defining which fields (like Email, Phone Number, or Full Name) will identify duplicates. Use Dynamics 365's "Advanced Find" feature to locate potential duplicates based on these fields. Then, create a Power Automate flow to retrieve and review contact records, delete duplicates, and retain one primary record. The flow can be triggered manually or on a schedule and involves steps like listing contacts, looping through them to find duplicates, and using conditions to delete duplicates while preserving a primary record.
    If you’re looking for a more advanced solution to remove duplicate records in bulk, you might consider the DeDupeD app by Inogic. This app allows you to easily identify and delete duplicate records across CRM entities, including contacts, accounts, leads, cases, and even custom entities. With DeDupeD, you can merge multiple duplicate records directly from within individual records, letting you pick a “master” record to keep while merging the rest. This allows you to control which data to retain, ensuring Dynamics 365 CRM have complete data accuracy.
    Here are some key features of DeDupeD:
    Duplicate Identification: helps you locate and manage duplicate records in your Dynamics 365 CRM efficiently.
    Schedule Duplicate Detection: Users can schedule duplicate detection jobs to automatically detect duplicates on a daily, weekly, or monthly basis.
    Duplicate Prevention: It prevents prevent duplicate records from entering the CRM system, both on the client side and server side.
    Merge Duplicates: The user can seamlessly merge duplicate records, selecting a master record to retain essential data for complete and consistent information.
    Clean Up History Duplicate Records in Bulk: Allows users to efficiently clean up and merge historical duplicate records in bulk within Dynamics 365 CRM, ensuring accurate data without the need for manual identification.
    Phonetic Fuzzy Matching: Users can detect and merge similar sounding duplicate records using fuzzy matching logic.
    You can experience the functionality of DeDupeD by downloading a 15-day trial from our website or Microsoft AppSource. For any assistance or inquiries, feel free to contact us at crm@inogic.com.
    PS: If you're also looking for a solution to restore deleted Dynamics CRM records, consider the undo2resotre app developed by Inogic, also available on Microsoft Appsource. This app allows you to effortlessly restore deleted Dynamic 365 CRM data with a single click, whether it's the most recent change, previous modifications, or even a mistakenly deleted record.
     
    Thanks,
    Sam
    Website: www.inogic.com
  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Super User 2025 Season 2 on at
    Delete Existing Duplicate Contacts in Contact Entity
    Hello User,
     
    To delete duplicate rows from the Contact entity in Dynamics 365 Sales using Power Automate (Microsoft Flow), you can follow these steps:
     
    1. Identify Duplicates:
    Before setting up the flow, you need to define how you'll identify duplicates. This could be based on specific fields such as Email, Phone Number, Full Name, or a combination of fields.
     
    You can use the "Advanced Find" feature in Dynamics 365 to search for potential duplicates based on these fields.
     
    2. Create the Power Automate Flow:
    In Power Automate, you can set up a flow that retrieves contacts, compares them for duplicates, and deletes them if duplicates are found.
     
    Here’s an approach for setting up the flow:
     
    2.1 Trigger: Manual or Scheduled Flow
    You can either manually trigger the flow or use a scheduled trigger to run it periodically. For example, "Recurrence" can be set to run daily, weekly, etc.
     
    2.2 List Rows: Retrieve Contacts from Dataverse
    Use the List Rows action from the Dataverse connector to retrieve all contacts from the Contact table.
     
    You can specify an OData query to filter rows based on fields likely to have duplicates (e.g., filter by email, phone number, etc.).
     
    Example Action:
     
    Table Name: Contact
    OData Filter Query: emailaddress1 ne null
     
    2.3 Loop Through Contacts:
    Use an Apply to Each action to loop through the retrieved contact rows. Inside this loop, you can check for duplicate records based on the chosen fields.
     
    2.4 Condition to Identify Duplicates:
    Inside the loop, use a List Rows action again to search for other contacts with the same value in the fields you're comparing for duplicates (e.g., email address).
     
    Use the returned records from the second List Rows to determine if there is more than one contact with the same key values.
     
    2.5 Delete Duplicates:
    Once a duplicate is identified, use the Delete a Row action to delete the duplicate record.
     
    To avoid deleting all records in a duplicate set, you can keep one record (e.g., the oldest or the first retrieved) and delete the rest.
     
    Thank you,
    Amit Katariya
  • Suggested answer
    Muhammad.Affan Profile Picture
    4,620 Super User 2025 Season 2 on at
    Delete Existing Duplicate Contacts in Contact Entity
    Hi Ali,
     
    Refer this link it will provide you more insight :
     
     
    Thanks
    Affan
    If my suggested answer has helped, please mark it as verified.
  • Suggested answer
    Vahid Ghafarpour Profile Picture
    11,940 Super User 2025 Season 2 on at
    Delete Existing Duplicate Contacts in Contact Entity
    You can create a Scheduled flow in Power Automate that for example each day.
    Add a get record action to it to fetch the contacts from Dynamics 365 Sales. Next use the Filter Array action to filter out duplicate rows based on your criteria (e.g., email address, phone number, etc.). You can use expressions to identify duplicates. and finally add the Delete Record action to delete the duplicate contacts.
     
    It can be an Instant flow if you want to trigger it manually.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 167

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 116 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans